private static function html_code(Collection $items, $pattern, $alias, $type, $group_icon, $path) { if ($pattern == 'TREE') { return Menu::tree_view($items, $alias, $type, $group_icon, $path); } else { if ($pattern == 'LABLE') { return Menu::lable_view($items, $alias, $type, $path); } else { return ''; } } }
protected function init_data(Request $request, &$data) { $data['session'] = $request->session(); $data['path'] = $request->path(); $data['menu'] = Menu::builder($request->session()->get('static_menu'), $request->path()); }