cms-niceties/src/Extensions/SiteTreeExtension.php

31 lines
699 B
PHP
Raw Normal View History

2021-06-19 21:30:03 +02:00
<?php
namespace A2nt\CMSNiceties\Extensions;
use SilverStripe\Forms\TextareaField;
use SilverStripe\ORM\DataExtension;
use SilverStripe\Forms\FieldList;
2022-05-10 13:09:06 +02:00
/**
* Class \A2nt\CMSNiceties\Extensions\SiteTreeExtension
*
* @property \A2nt\CMSNiceties\Extensions\SiteTreeExtension $owner
* @property string $ExtraCode
*/
2021-06-19 21:30:03 +02:00
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'
),
]);
}
}