public function ConfigEntityRevisionsRevertFormBase::applyRevisionChange in Config Entity Revisions 8
Same name and namespace in other branches
- 8.2 src/ConfigEntityRevisionsRevertFormBase.php \Drupal\config_entity_revisions\ConfigEntityRevisionsRevertFormBase::applyRevisionChange()
- 1.x src/ConfigEntityRevisionsRevertFormBase.php \Drupal\config_entity_revisions\ConfigEntityRevisionsRevertFormBase::applyRevisionChange()
Apply the revision insert/update.
1 call to ConfigEntityRevisionsRevertFormBase::applyRevisionChange()
- ConfigEntityRevisionsRevertFormBase::submitForm in src/
ConfigEntityRevisionsRevertFormBase.php - Form submission handler.
1 method overrides ConfigEntityRevisionsRevertFormBase::applyRevisionChange()
- ConfigEntityRevisionsRevertFormTest3::applyRevisionChange in tests/
src/ Unit/ ConfigEntityRevisionsRevertFormBaseTest.php - Apply the revision insert/update.
File
- src/
ConfigEntityRevisionsRevertFormBase.php, line 234
Class
- ConfigEntityRevisionsRevertFormBase
- Provides a form for reverting / publishing a revision.
Namespace
Drupal\config_entity_revisionsCode
public function applyRevisionChange() {
if ($this->action == 'revert') {
$this->revision = $this
->prepareRevertedRevision($this->revision);
}
else {
$this->revision = $this
->prepareToPublishCurrentRevision($this->revision);
}
$this->revision
->save();
}