mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
getHookObjects() takes parent classes into account
This commit is contained in:
parent
199f26703c
commit
c3f5a637f6
|
@ -217,13 +217,16 @@ class SeedDMS_View_Common {
|
|||
*/
|
||||
public function getHookObjects($classname='') { /* {{{ */
|
||||
if($classname)
|
||||
$tmp = explode('_', $classname);
|
||||
$tmps = array(explode('_', $classname)[2]);
|
||||
else
|
||||
$tmp = explode('_', get_class($this));
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['view'][lcfirst($tmp[2])])) {
|
||||
return $GLOBALS['SEEDDMS_HOOKS']['view'][lcfirst($tmp[2])];
|
||||
$tmps = $this->getHookClassNames();
|
||||
$hooks = [];
|
||||
foreach($tmps as $tmp) {
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['view'][lcfirst($tmp)])) {
|
||||
$hooks = array_merge($hooks, $GLOBALS['SEEDDMS_HOOKS']['view'][lcfirst($tmp)]);
|
||||
}
|
||||
}
|
||||
return array();
|
||||
return $hooks;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user