Skip to content

Commit

Permalink
added 'afterAdminSave' hook (#866)
Browse files Browse the repository at this point in the history
* added 'afterAdminSave' hook

this event is fired just after the save was correctly completed from Admin plugin

* Change of the new event hook name

consistency oblige, new name is `onAdminAfterSave`
  • Loading branch information
amtur8 authored and rhukster committed Nov 19, 2016
1 parent 772399d commit 91bda37
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions classes/admincontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ public function taskSave()
$this->grav->fireEvent('onAdminSave', new Event(['object' => &$obj]));
$obj->save($reorder);
$this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.SUCCESSFULLY_SAVED'), 'info');
$this->grav->fireEvent('onAdminAfterSave', new Event(['object' => &$obj]));
}

if ($this->view != 'pages') {
Expand Down

0 comments on commit 91bda37

Please sign in to comment.