pass class name to preRun, invoke() returns false if preRun fails

This commit is contained in:
Uwe Steinmann 2022-08-01 12:11:51 +02:00
parent 59d24bde03
commit 5378d6e7d9

View File

@ -66,7 +66,7 @@ class SeedDMS_View_Common {
elseif($request->isMethod('post'))
$action = $request->request->get('action');
}
if(!$this->callHook('preRun', $action ? $action : 'show')) {
if(!$this->callHook('preRun', get_class($this), $action ? $action : 'show')) {
if($action) {
if(method_exists($this, $action)) {
$this->{$action}();
@ -75,6 +75,8 @@ class SeedDMS_View_Common {
}
} else
$this->show();
} else {
return false;
}
$this->callHook('postRun', $action ? $action : 'show');
}