mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-05 04:46:03 +01:00
Added new onAdminTaskExecute() event to better support 3rd party plugin tasks
This commit is contained in:
@@ -188,15 +188,17 @@ class AdminController
|
||||
$success = true;
|
||||
$this->admin->setMessage($e->getMessage(), 'error');
|
||||
}
|
||||
} else {
|
||||
$success = $this->grav->fireEvent('onAdminTaskExecute', new Event(['controller' => $this, 'method' => $method]));
|
||||
}
|
||||
|
||||
// Grab redirect parameter.
|
||||
$redirect = isset($this->post['_redirect']) ? $this->post['_redirect'] : null;
|
||||
unset($this->post['_redirect']);
|
||||
// Grab redirect parameter.
|
||||
$redirect = isset($this->post['_redirect']) ? $this->post['_redirect'] : null;
|
||||
unset($this->post['_redirect']);
|
||||
|
||||
// Redirect if requested.
|
||||
if ($redirect) {
|
||||
$this->setRedirect($redirect);
|
||||
}
|
||||
// Redirect if requested.
|
||||
if ($redirect) {
|
||||
$this->setRedirect($redirect);
|
||||
}
|
||||
|
||||
return $success;
|
||||
|
||||
Reference in New Issue
Block a user