| 1 | <?php |
||
| 2 | |||
| 3 | namespace Dynamic\Foxy\Integrations\Model; |
||
| 4 | |||
| 5 | use Dynamic\Foxy\Model\Setting; |
||
| 6 | use SilverStripe\ORM\DataObject; |
||
| 7 | |||
| 8 | class FoxyIntegrationObject extends DataObject |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var array |
||
| 12 | */ |
||
| 13 | private static $db = array( |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 14 | 'Title' => 'Varchar(150)', |
||
| 15 | 'URL' => 'Varchar(255)' |
||
| 16 | ); |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | private static $has_one = array( |
||
|
0 ignored issues
–
show
|
|||
| 22 | 'FoxySetting' => Setting::class, |
||
| 23 | ); |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | private static $singular_name = 'Foxy Integration'; |
||
|
0 ignored issues
–
show
|
|||
| 29 | |||
| 30 | /** |
||
| 31 | * @var string |
||
| 32 | */ |
||
| 33 | private static $plural_name = 'Foxy Integrations'; |
||
|
0 ignored issues
–
show
|
|||
| 34 | |||
| 35 | /** |
||
| 36 | * @var string |
||
| 37 | */ |
||
| 38 | private static $table_name = 'FoxyIntegrationObject'; |
||
|
0 ignored issues
–
show
|
|||
| 39 | |||
| 40 | /** |
||
| 41 | * @var array |
||
| 42 | */ |
||
| 43 | private static $summary_fields = array( |
||
|
0 ignored issues
–
show
|
|||
| 44 | 'Title', |
||
| 45 | 'URL' |
||
| 46 | ); |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return \SilverStripe\Forms\FieldList |
||
| 50 | */ |
||
| 51 | public function getCMSFields() |
||
| 52 | { |
||
| 53 | $fields = parent::getCMSFields(); |
||
| 54 | |||
| 55 | $fields->removeByName([ |
||
| 56 | 'FoxySettingID', |
||
| 57 | ]); |
||
| 58 | |||
| 59 | return $fields; |
||
| 60 | } |
||
| 61 | } |
||
| 62 |