mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT: added onBeforeVersionedPublish() hook. PATCH via muzdowski (#6016)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114813 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
63d2971158
commit
2f56a8bcad
@ -533,6 +533,8 @@ class Versioned extends DataObjectDecorator {
|
||||
* @param createNewVersion Set this to true to create a new version number. By default, the existing version number will be copied over.
|
||||
*/
|
||||
function publish($fromStage, $toStage, $createNewVersion = false) {
|
||||
$this->owner->extend('onBeforeVersionedPublish', $fromStage, $toStage, $createNewVersion);
|
||||
|
||||
$baseClass = $this->owner->class;
|
||||
while( ($p = get_parent_class($baseClass)) != "DataObject") $baseClass = $p;
|
||||
$extTable = $this->extendWithSuffix($baseClass);
|
||||
|
Loading…
Reference in New Issue
Block a user