silverstripe-subsites/code/extensions/CMSPageAddControllerExtension.php
Werner M. Krauß a4a1ab6a78 formatting code
2017-06-01 15:57:53 +02:00

18 lines
378 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()));
}
}