silverstripe-subsites/code/extensions/CMSPageAddControllerExtension.php
2017-06-01 15:31:30 +02:00

17 lines
377 B
PHP

<?php
namespace SilverStripe\Subsites\Extensions;
use SilverStripe\Core\Extension;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Subsites\Model\Subsite;
class CMSPageAddControllerExtension extends Extension
{
public function updatePageOptions(&$fields)
{
$fields->push(new HiddenField('SubsiteID', 'SubsiteID', Subsite::currentSubsiteID()));
}
}