silverstripe-subsites/code/extensions/CMSPageAddControllerExtension.php

12 lines
268 B
PHP
Raw Normal View History

<?php
2016-09-22 16:38:29 +02:00
use SilverStripe\Forms\HiddenField;
use SilverStripe\Core\Extension;
class CMSPageAddControllerExtension extends Extension {
function updatePageOptions(&$fields) {
$fields->push(new HiddenField('SubsiteID', 'SubsiteID', Subsite::currentSubsiteID()));
}
}