static function BackendNavModules()
    {
        $result = array();
        $allBundles = PathUtil::Bundles();
        //force Core to appear first
        $coreKey = array_search('Core', $allBundles);
        unset($allBundles[$coreKey]);
        array_unshift($allBundles, 'Core');
        $bundles = array_values($allBundles);
        
        foreach ($bundles as $bundle)
        {
            $modules = PathUtil::BackendModules($bundle);
           
            foreach ($modules as $module)
            {
                $type = self::CalcModuleType($bundle, $module);
                $instance = self::CreateBackendModule($type);
                
                if (!($instance instanceof BackendModule))
                {
                    continue;
                }
                
                if ($instance->SideNavIndex() >= 0 &&
                        BackendModule::Guard()->Allow(BackendAction::Read(), $instance))
                {
                    self::AddBackendNavModule($result, $instance);
                }
            }
        }
        return self::SortByNavIndex($result);
    }