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