mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00:00
ENHANCEMENT Added LeftAndMainDecorator
API CHANGE Deprecated DataObjectDecorator->augmentInit(), use LeftAndMainDecorator->init() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@65454 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0e727e458d
commit
62a36c6828
@ -455,6 +455,9 @@ JS;
|
||||
return $this->returnItemToUser($p);
|
||||
}
|
||||
|
||||
/**
|
||||
* @uses LeftAndMainDecorator->augmentNewSiteTreeItem()
|
||||
*/
|
||||
public function getNewItem($id, $setID = true) {
|
||||
list($dummy, $className, $parentID, $suffix) = explode('-',$id);
|
||||
if(Translatable::is_enabled()) {
|
||||
|
@ -64,6 +64,10 @@ class LeftAndMain extends Controller {
|
||||
'themedcss' => array(),
|
||||
);
|
||||
|
||||
/**
|
||||
* @uses LeftAndMainDecorator->init()
|
||||
* @uses LeftAndMainDecorator->accessedCMS()
|
||||
*/
|
||||
function init() {
|
||||
Director::set_site_mode('cms');
|
||||
|
||||
@ -231,8 +235,12 @@ class LeftAndMain extends Controller {
|
||||
|
||||
Requirements::customScript('Behaviour.addLoader(hideLoading);');
|
||||
|
||||
// DEPRECATED 2.3: Use init()
|
||||
$dummy = null;
|
||||
$this->extend('augmentInit', $dummy);
|
||||
|
||||
$dummy = null;
|
||||
$this->extend('init', $dummy);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------//
|
||||
|
21
code/LeftAndMainDecorator.php
Normal file
21
code/LeftAndMainDecorator.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* Plug-ins for additional functionality in your LeftAndMain classes.
|
||||
*
|
||||
* @package cms
|
||||
* @subpackage core
|
||||
*/
|
||||
abstract class SiteTreeDecorator extends Extension {
|
||||
|
||||
function init() {
|
||||
}
|
||||
|
||||
function accessedCMS() {
|
||||
}
|
||||
|
||||
function augmentNewSiteTreeItem(&$item) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user