mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API: add onBeforeRollback() and onAfterRollback() hooks.
This commit is contained in:
parent
7871e5a85e
commit
5238e9cf48
@ -1077,8 +1077,12 @@ class Versioned extends DataExtension {
|
||||
* @param $version Either the string 'Live' or a version number
|
||||
*/
|
||||
public function doRollbackTo($version) {
|
||||
$this->extend('onBeforeRollback', $version);
|
||||
$this->publish($version, "Stage", true);
|
||||
|
||||
$this->owner->writeWithoutVersion();
|
||||
|
||||
$this->extend('onAfterRollback', $version);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user