silverstripe /
silverstripe-documentconverter
| 1 | <?php |
||
| 2 | |||
| 3 | namespace SilverStripe\DocumentConverter; |
||
| 4 | |||
| 5 | use SilverStripe\Assets\File; |
||
| 6 | use SilverStripe\Forms\FieldList; |
||
| 7 | use SilverStripe\ORM\DataExtension; |
||
| 8 | |||
| 9 | class PageExtension extends DataExtension |
||
| 10 | { |
||
| 11 | |||
| 12 | private static $has_one = [ |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 13 | 'ImportedFromFile' => File::class |
||
| 14 | ]; |
||
| 15 | |||
| 16 | public function updateCMSFields(FieldList $fields) |
||
| 17 | { |
||
| 18 | /* |
||
| 19 | // Currently the ToggleCompositeField plays badly with TreeDropdownField formatting. |
||
| 20 | // Could be switched back in the future, if this is fixed. |
||
| 21 | $fields->addFieldToTab('Root.Main', |
||
| 22 | ToggleCompositeField::create('Import', 'Import', [ |
||
| 23 | SettingsField::create() |
||
| 24 | ])->setHeadingLevel(4) |
||
| 25 | ); |
||
| 26 | */ |
||
| 27 | $fields->findOrMakeTab( |
||
| 28 | 'Root.Import', |
||
| 29 | _t(__CLASS__ . '.ImportTab', 'Import') |
||
| 30 | ); |
||
| 31 | $fields->addFieldToTab('Root.Import', SettingsField::create()); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |