mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT: allow onAfterPublish and onBeforePublish handlers directly on Page classes (#5112) (from r103198)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112124 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
1a67919d33
commit
37f18971c5
@ -2013,7 +2013,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
if(!$original) $original = new SiteTree();
|
if(!$original) $original = new SiteTree();
|
||||||
|
|
||||||
// Handle activities undertaken by decorators
|
// Handle activities undertaken by decorators
|
||||||
$this->extend('onBeforePublish', $original);
|
$this->invokeWithExtensions('onBeforePublish', $original);
|
||||||
|
|
||||||
//$this->PublishedByID = Member::currentUser()->ID;
|
//$this->PublishedByID = Member::currentUser()->ID;
|
||||||
$this->write();
|
$this->write();
|
||||||
@ -2052,7 +2052,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle activities undertaken by decorators
|
// Handle activities undertaken by decorators
|
||||||
$this->extend('onAfterPublish', $original);
|
$this->invokeWithExtensions('onAfterPublish', $original);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user