Whups::listTemplates PHP Method

listTemplates() public static method

Lists all templates of a given type.
public static listTemplates ( string $type ) : array
$type string The kind of template ('searchresults', etc.) to list.
return array All templates of the requested type.
    public static function listTemplates($type)
    {
        $templates = array();
        $_templates = Horde::loadConfiguration('templates.php', '_templates', 'whups');
        foreach ($_templates as $name => $info) {
            if ($info['type'] == $type) {
                $templates[$name] = $info['name'];
            }
        }
        return $templates;
    }