Jarves\Controller\Admin\BackendController::getMenusAction PHP Method

getMenusAction() public method

public getMenusAction ( ) : array
return array
    public function getMenusAction()
    {
        $entryPoints = array();
        foreach ($this->jarves->getConfigs() as $bundleName => $bundleConfig) {
            foreach ($bundleConfig->getAllEntryPoints() as $subEntryPoint) {
                $path = $subEntryPoint->getFullPath();
                if (substr_count($path, '/') <= 3) {
                    if ($subEntryPoint->isLink()) {
                        if ($this->acl->check(ACLRequest::create('jarves/entryPoint', ['path' => '/' . $path]))) {
                            $entryPoints[$path] = array('label' => $subEntryPoint->getLabel(), 'icon' => $subEntryPoint->getIcon(), 'fullPath' => $path, 'path' => $subEntryPoint->getPath(), 'type' => $subEntryPoint->getType(), 'system' => $subEntryPoint->getSystem(), 'templateUrl' => $subEntryPoint->getTemplateUrl(), 'level' => substr_count($path, '/'));
                        }
                    }
                }
            }
        }
        return $entryPoints;
    }