mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 09:05:46 +00:00
IMPR: RedirectorPage open in new window
This commit is contained in:
parent
1adfc4ef01
commit
db5192e2bb
28
src/Extensions/RedirectorPageEx.php
Normal file
28
src/Extensions/RedirectorPageEx.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace A2nt\CMSNiceties\Extensions;
|
||||
|
||||
use SilverStripe\Forms\CheckboxField;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
|
||||
class RedirectorPageEx extends DataExtension
|
||||
{
|
||||
private static $db = [
|
||||
'OpenInNewTab' => 'Boolean(0)',
|
||||
];
|
||||
private static $defaults = [
|
||||
'OpenInNewTab' => 0,
|
||||
];
|
||||
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
$MainTab = $fields->findOrMakeTab('Root.Main');
|
||||
$MainTab->push(
|
||||
CheckboxField::create(
|
||||
'OpenInNewTab',
|
||||
_t('RedirectorPage.OpenInNewTab', 'Open in new tab')
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user