<?php
namespace front\Views;

class Menu
{
    public static function pages($pages, $level = 0, $current_page = 0)
    {
        $tpl = new \Shared\Tpl\Tpl;
        $tpl->pages        = $pages;
        $tpl->level         = $level;
        $tpl->current_page  = $current_page;
        return $tpl->render('menu/pages');
    }

    public static function menu($menu, $current_page)
    {
        $tpl = new \Shared\Tpl\Tpl;
        $tpl->menu         = $menu;
        $tpl->current_page = $current_page;
        return $tpl->render('menu/menu');
    }
}
