silverstripe-subsites/code/extensions/CMSPageAddControllerExtension.php
2017-05-24 15:26:28 +02:00

19 lines
372 B
PHP

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