Habari\Plugins::implemented PHP Method

implemented() public static method

Determine if a hook of any type is implemented
public static implemented ( string $hookname, string $searchtype = null ) : array | boolean
$hookname string The name of the hook to check for
$searchtype string Optional. The type of hook to check for
return array | boolean An array with the types of hook implemented, or false if not implemented
    public static function implemented($hookname, $searchtype = null)
    {
        $result = array();
        foreach (self::$hooks as $type => $hooks) {
            if ($searchtype && $searchtype != $type) {
                continue;
            }
            if (isset($hooks[$hookname])) {
                $result[$type] = $type;
            }
        }
        return count($result) > 0 ? $result : false;
    }