2013-05-28 02:17:16 +02:00
|
|
|
<?php
|
2016-09-22 16:38:29 +02:00
|
|
|
|
2017-05-24 12:32:05 +02:00
|
|
|
namespace SilverStripe\Subsites\Extensions;
|
2017-06-01 15:57:53 +02:00
|
|
|
|
2016-09-22 16:38:29 +02:00
|
|
|
use SilverStripe\Core\Extension;
|
2017-08-30 01:06:07 +02:00
|
|
|
use SilverStripe\Forms\FieldList;
|
2017-05-24 15:26:28 +02:00
|
|
|
use SilverStripe\Forms\HiddenField;
|
2017-08-30 01:06:07 +02:00
|
|
|
use SilverStripe\Subsites\State\SubsiteState;
|
2017-05-24 12:32:05 +02:00
|
|
|
|
2017-05-24 15:26:28 +02:00
|
|
|
class CMSPageAddControllerExtension extends Extension
|
|
|
|
{
|
2017-08-30 01:06:07 +02:00
|
|
|
public function updatePageOptions(FieldList $fields)
|
2017-05-24 15:26:28 +02:00
|
|
|
{
|
2017-08-30 01:06:07 +02:00
|
|
|
$fields->push(HiddenField::create('SubsiteID', 'SubsiteID', SubsiteState::singleton()->getSubsiteId()));
|
2017-05-24 15:26:28 +02:00
|
|
|
}
|
2013-05-28 02:17:16 +02:00
|
|
|
}
|