mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Added ability for SiteTree extensions to define contentcontrollerInit() or modelascontrollerInit(), to add extra behaviour necessary for some modules (in particular, subsites)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@40224 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f9b575dff4
commit
f97fc4ad65
@ -91,7 +91,8 @@ class ContentController extends Controller {
|
||||
die();
|
||||
}
|
||||
|
||||
Versioned::choose_site_stage();
|
||||
singleton('SiteTree')->extend('contentcontrollerInit', $this);
|
||||
|
||||
Director::set_site_mode('site');
|
||||
|
||||
// Check permissions
|
||||
|
@ -13,7 +13,7 @@ class ModelAsController extends Controller implements NestedController {
|
||||
}
|
||||
|
||||
public function init() {
|
||||
Versioned::choose_site_stage();
|
||||
singleton('SiteTree')->extend('modelascontrollerInit', $this);
|
||||
}
|
||||
|
||||
public function getNestedController() {
|
||||
|
Loading…
Reference in New Issue
Block a user