diff --git a/phpgwapi/inc/class.hooks.inc.php b/phpgwapi/inc/class.hooks.inc.php index 86244ee219..f88ed0ba63 100644 --- a/phpgwapi/inc/class.hooks.inc.php +++ b/phpgwapi/inc/class.hooks.inc.php @@ -201,6 +201,18 @@ class hooks return count($this->locations[$location][$app]); } + /** + * check which apps implement a given hook + * + * @param string $location location-name + * @return array of apps implementing given hook + */ + function hook_implemented($location) + { + //error_log(__METHOD__.__LINE__.array2string($this->locations[$location])); + return isset($this->locations[$location]) ? array_keys($this->locations[$location]) : array(); + } + /** * Register and/or de-register an application's hooks *