mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
add method callHook()
this method is ment to be called from the view classes. It checks for a hook set up for the current view.
This commit is contained in:
parent
18bfb51dd5
commit
50e41be376
|
@ -52,5 +52,17 @@ class SeedDMS_View_Common {
|
|||
|
||||
function show() {
|
||||
}
|
||||
|
||||
function callHook($hook) {
|
||||
$tmp = explode('_', get_class($this));
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS'][lcfirst($tmp[2])])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS'][lcfirst($tmp[2])] as $hookObj) {
|
||||
if (method_exists($hookObj, $hook)) {
|
||||
return $hookObj->$hook($this);
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue
Block a user