Exemple #1
0
 public static function renderNode($node)
 {
     echo "<li>";
     echo "<b>{$node->name}</b>";
     if ($node->children()) {
         echo "<ul>";
         foreach ($node->children as $child) {
             Metronic::renderNode($child);
         }
         echo "</ul>";
     }
     echo "</li>";
 }
Exemple #2
0
    {
        self::module('theme');
        return implode(PHP_EOL, self::$dr);
    }
    public static function init()
    {
        self::module('metronic');
    }
    /* ADMIN DASHBOARD MENU ITEM */
    protected static $menu = [null, null];
    public static function menu($menu = null, $subItem = null)
    {
        self::$menu = [$menu, $subItem];
    }
    public static function isMenu($menu, $subItem = null)
    {
        return self::$menu[0] === $menu && ($subItem === null || self::$menu[1] === $subItem);
    }
    /* ADMIN DASHBOARD BREADCRUMBS */
    protected static $breadcrumbs = [];
    public static function addPath($title, $url = null, array $attributes = [])
    {
        self::$breadcrumbs[] = [$title, $url, $attributes];
    }
    public static function breadcrumbs()
    {
        return self::$breadcrumbs;
    }
}
Metronic::init();