2016-10-14 03:30:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\ORM\Tests\DataObjectTest;
|
|
|
|
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
use SilverStripe\ORM\DataExtension;
|
|
|
|
|
|
|
|
class Team_Extension extends DataExtension implements TestOnly
|
|
|
|
{
|
2017-12-14 02:17:19 +01:00
|
|
|
private static $summary_fields = [
|
|
|
|
'Title' => 'Custom Title', // override non-associative 'Title'
|
|
|
|
];
|
|
|
|
|
2020-04-20 19:58:09 +02:00
|
|
|
private static $db = [
|
2016-12-16 05:34:21 +01:00
|
|
|
'ExtendedDatabaseField' => 'Varchar'
|
2020-04-20 19:58:09 +02:00
|
|
|
];
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2020-04-20 19:58:09 +02:00
|
|
|
private static $has_one = [
|
2016-12-16 05:34:21 +01:00
|
|
|
'ExtendedHasOneRelationship' => Player::class
|
2020-04-20 19:58:09 +02:00
|
|
|
];
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
public function getExtendedDynamicField()
|
|
|
|
{
|
|
|
|
return "extended dynamic field";
|
|
|
|
}
|
2016-10-14 03:30:05 +02:00
|
|
|
}
|