foreach (\Config::get('module_paths') as $m)
{
// loop through all modules installed in this path
$modules = \File::read_dir($m, 1, array('!.*' => 'file'));
foreach ($modules as $module => $unused)
{
// trim the trailing slash
$module = rtrim($module, DS);
// make sure the module is loaded
\Module::load($module);
// fetch the menu items defined by this module and accessible by the user
$this->menu_items = array_merge($this->menu_items, call_user_func('\\'.ucfirst($module).'\\Module::menu'));
}
}
It looks like you're new here. If you want to get involved, click one of these buttons!