public function getAdminWrapperAction()
    {
        $allowed = $this->cmsPermissionChecks->siteAdminCheck($this->currentSite);

        if (!$allowed) {
            return null;
        }

        /** @var RouteMatch $routeMatch */
        $routeMatch = $this->getEvent()->getRouteMatch();
        $siteId = $this->currentSite->getSiteId();
        $sourcePageName = $routeMatch->getParam('page', 'index');

        if ($sourcePageName instanceof Page) {
            $sourcePageName = $sourcePageName->getName();
        }

        $pageType = $routeMatch->getParam('pageType', 'n');

        $view = new ViewModel();
        $view->setVariable('restrictions', false);
        if ($this->cmsPermissionChecks->isPageRestricted($siteId, $pageType, $sourcePageName, 'read') == true) {
            $view->setVariable('restrictions', true);
        }

        $view->setVariable('adminMenu', $this->adminPanelConfig);
        $view->setTemplate('rcm-admin/admin/admin');

        return $view;
    }
public function getAdminWrapperAction()
    {
        $allowed = $this->cmsPermissionChecks->siteAdminCheck($this->currentSite);

        if (!$allowed) {
            return null;
        }

        /** @var RouteMatch $routeMatch */
        $routeMatch = $this->getEvent()->getRouteMatch();
        $siteId = $this->currentSite->getSiteId();
        $sourcePageName = $routeMatch->getParam('page', 'index');

        if ($sourcePageName instanceof Page) {
            $sourcePageName = $sourcePageName->getName();
        }

        $pageType = $routeMatch->getParam('pageType', 'n');

        $view = new ViewModel();
        $view->setVariable('restrictions', false);
        if ($this->cmsPermissionChecks->isPageRestricted($siteId, $pageType, $sourcePageName, 'read') == true) {
            $view->setVariable('restrictions', true);
        }

        $view->setVariable('adminMenu', $this->adminPanelConfig);
        $view->setTemplate('rcm-admin/admin/admin');

        return $view;
    }
public function getAdminWrapperAction ( ) { $ allowed = $ this -> cmsPermissionChecks -> siteAdminCheck ( $ this -> currentSite ) ; if ( ! $ allowed ) { return null ; } /** @var RouteMatch $routeMatch */ $ routeMatch = $ this -> getEvent ( ) -> getRouteMatch ( ) ; $ siteId = $ this -> currentSite -> getSiteId ( ) ; $ sourcePageName = $ routeMatch -> getParam ( 'page' , 'index' ) ; if ( $ sourcePageName instanceof Page ) { $ sourcePageName = $ sourcePageName -> getName ( ) ; } $ pageType = $ routeMatch -> getParam ( 'pageType' , 'n' ) ; $ view = new ViewModel ( ) ; $ view -> setVariable ( 'restrictions' , false ) ; if ( $ this -> cmsPermissionChecks -> isPageRestricted ( $ siteId , $ pageType , $ sourcePageName , 'read' ) == true ) { $ view -> setVariable ( 'restrictions' , true ) ; } $ view -> setVariable ( 'adminMenu' , $ this -> adminPanelConfig ) ; $ view -> setTemplate ( 'rcm-admin/admin/admin' ) ; return $ view ; }
Get the Admin Menu Bar

@return mixed
Get the Admin Menu Bar