protected function module_main() { //get menus from all plugins $menu = (array) null; $plugins = cls_orm::find('plugins', 'enable=1'); foreach ($plugins as $plugin) { //now get all menus from plugins if (method_exists($plugin->name, 'core_menu')) { $plugin_menu = call_user_func(array($plugin->name, 'core_menu')); foreach ($plugin_menu as $mnu) { array_push($menu, $mnu); } } } //now $menu is 2d array with plugins menu //show action //check for that plugin is set if (!isset($_GET['p'])) { $_GET['p'] = 'core'; } //check for that action is set if (!isset($_GET['a'])) { $_GET['a'] = 'default'; } //now going to do action $router = new cls_router($_GET['p'], $_GET['a']); $plugin_content = $router->show_content(false); $obj_users = new users(); $user_info = $obj_users->get_info(); $content = $this->module_load(array(_('Administrator:') . $plugin_content[0], $this->view_main($menu, $plugin_content[1], $user_info))); return $content; }