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'
|
|
|
|
];
|
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $db = array(
|
|
|
|
'ExtendedDatabaseField' => 'Varchar'
|
|
|
|
);
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $has_one = array(
|
|
|
|
'ExtendedHasOneRelationship' => Player::class
|
|
|
|
);
|
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
|
|
|
}
|