silverstripe-subsites/code/extensions/CMSPageAddControllerExtension.php

17 lines
356 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;
2016-09-22 16:38:29 +02:00
use SilverStripe\Forms\HiddenField;
use SilverStripe\Core\Extension;
2017-05-24 12:32:05 +02:00
use SilverStripe\Subsites\Model\Subsite;
class CMSPageAddControllerExtension extends Extension {
function updatePageOptions(&$fields) {
$fields->push(new HiddenField('SubsiteID', 'SubsiteID', Subsite::currentSubsiteID()));
}
}