mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
ENHANCEMENT Splitting up CMSMain into CMSPageEditController and CMSPageSettingsController
This commit is contained in:
parent
8af9c546cf
commit
2e2e312da9
@ -29,3 +29,7 @@ else SS_Report::register('ReportAdmin', 'BrokenLinksReport',-20);
|
|||||||
ShortcodeParser::get('default')->register('sitetree_link', array('SiteTree', 'link_shortcode_handler'));
|
ShortcodeParser::get('default')->register('sitetree_link', array('SiteTree', 'link_shortcode_handler'));
|
||||||
|
|
||||||
Object::add_extension('File', 'SiteTreeFileExtension');
|
Object::add_extension('File', 'SiteTreeFileExtension');
|
||||||
|
|
||||||
|
// TODO Remove once we can configure CMSMenu through static, nested configuration files
|
||||||
|
CMSMenu::remove_menu_item('CMSPageEditController');
|
||||||
|
CMSMenu::remove_menu_item('CMSPageSettingsController');
|
13
code/controller/CMSPageEditController.php
Normal file
13
code/controller/CMSPageEditController.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
class CMSPageEditController extends CMSMain {
|
||||||
|
|
||||||
|
static $url_segment = 'page/edit';
|
||||||
|
static $url_rule = '/$Action/$ID/$OtherID';
|
||||||
|
static $url_priority = 41;
|
||||||
|
|
||||||
|
function getEditForm($id = null, $fields = null) {
|
||||||
|
$record = $this->getRecord($id ? $id : $this->currentPageID());
|
||||||
|
return parent::getEditForm($record, ($record) ? $record->getCMSFields() : null);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
13
code/controller/CMSPageSettingsController.php
Normal file
13
code/controller/CMSPageSettingsController.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
class CMSPageSettingsController extends CMSMain {
|
||||||
|
|
||||||
|
static $url_segment = 'page/settings';
|
||||||
|
static $url_rule = '/$Action/$ID/$OtherID';
|
||||||
|
static $url_priority = 42;
|
||||||
|
|
||||||
|
function getEditForm($id = null, $fields = null) {
|
||||||
|
$record = $this->getRecord($id ? $id : $this->currentPageID());
|
||||||
|
return parent::getEditForm($record, ($record) ? $record->getSettingsFields() : null);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user