silverstripe-subsites/code/extensions/CMSPageAddControllerExtension.php

17 lines
377 B
PHP
Raw Normal View History

<?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-05-24 15:26:28 +02:00
use SilverStripe\Forms\HiddenField;
2017-05-24 12:32:05 +02:00
use SilverStripe\Subsites\Model\Subsite;
2017-05-24 15:26:28 +02:00
class CMSPageAddControllerExtension extends Extension
{
public function updatePageOptions(&$fields)
2017-05-24 15:26:28 +02:00
{
$fields->push(new HiddenField('SubsiteID', 'SubsiteID', Subsite::currentSubsiteID()));
}
}