mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 11:05:46 +02:00
25 lines
534 B
PHP
25 lines
534 B
PHP
|
<?php
|
||
|
|
||
|
namespace A2nt\CMSNiceties\Extensions;
|
||
|
|
||
|
use SilverStripe\Forms\TextareaField;
|
||
|
use SilverStripe\ORM\DataExtension;
|
||
|
use SilverStripe\Forms\FieldList;
|
||
|
|
||
|
class SiteTreeExtension extends DataExtension
|
||
|
{
|
||
|
private static $db = [
|
||
|
'ExtraCode' => 'Text',
|
||
|
];
|
||
|
|
||
|
public function updateSettingsFields(FieldList $fields)
|
||
|
{
|
||
|
$fields->addFieldsToTab('Root.Settings', [
|
||
|
TextareaField::create(
|
||
|
'ExtraCode',
|
||
|
'Extra page specific HTML code'
|
||
|
),
|
||
|
]);
|
||
|
}
|
||
|
}
|