Add an extension hook to the getIsModifiedOnStage method

This commit is contained in:
guywatson 2014-10-28 09:24:40 +11:00 committed by Daniel Hensby
parent 7fc5a29f35
commit d2f0eafa27

View File

@ -2809,7 +2809,10 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$stageVersion = Versioned::get_versionnumber_by_stage('SiteTree', 'Stage', $this->ID);
$liveVersion = Versioned::get_versionnumber_by_stage('SiteTree', 'Live', $this->ID);
return ($stageVersion && $stageVersion != $liveVersion);
$isModified = ($stageVersion && $stageVersion != $liveVersion);
$this->extend('getIsModifiedOnStage', $isModified);
return $isModified;
}
/**