private function getSections($shownExtension, $shownStructure)
    {

        $sections = array();
        $user = $this->getSession()->getUser();
        $structure = MenuService::getPerspective($shownExtension, $shownStructure);
        if (!is_null($structure)) {
            foreach ($structure->getChildren() as $section) {

                $resolver = new ActionResolver($section->getUrl());
                if (FuncProxy::accessPossible($user, $resolver->getController(), $resolver->getAction())) {

                    foreach($section->getActions() as $action){
                        $this->propagate($action);
                        $resolver = new ActionResolver($action->getUrl());
                        if(!FuncProxy::accessPossible($user, $resolver->getController(), $resolver->getAction())){
                            $section->removeAction($action);
                        }

                    }

                    $sections[] = $section;
                }
            }
        }

        return $sections;
    }
private function getSections($shownExtension, $shownStructure)
    {

        $sections = array();
        $user = $this->getSession()->getUser();
        $structure = MenuService::getPerspective($shownExtension, $shownStructure);
        if (!is_null($structure)) {
            foreach ($structure->getChildren() as $section) {

                $resolver = new ActionResolver($section->getUrl());
                if (FuncProxy::accessPossible($user, $resolver->getController(), $resolver->getAction())) {

                    foreach($section->getActions() as $action){
                        $this->propagate($action);
                        $resolver = new ActionResolver($action->getUrl());
                        if(!FuncProxy::accessPossible($user, $resolver->getController(), $resolver->getAction())){
                            $section->removeAction($action);
                        }

                    }

                    $sections[] = $section;
                }
            }
        }

        return $sections;
    }
private function getSections ( $ shownExtension , $ shownStructure ) { $ sections = array ( ) ; $ user = $ this -> getSession ( ) -> getUser ( ) ; $ structure = MenuService :: getPerspective ( $ shownExtension , $ shownStructure ) ; if ( ! is_null ( $ structure ) ) { foreach ( $ structure -> getChildren ( ) as $ section ) { $ resolver = new ActionResolver ( $ section -> getUrl ( ) ) ; if ( FuncProxy :: accessPossible ( $ user , $ resolver -> getController ( ) , $ resolver -> getAction ( ) ) ) { foreach ( $ section -> getActions ( ) as $ action ) { $ this -> propagate ( $ action ) ; $ resolver = new ActionResolver ( $ action -> getUrl ( ) ) ; if ( ! FuncProxy :: accessPossible ( $ user , $ resolver -> getController ( ) , $ resolver -> getAction ( ) ) ) { $ section -> removeAction ( $ action ) ; } } $ sections [ ] = $ section ; } } } return $ sections ; }
Get the sections of the current extension's structure

@param string $shownExtension
@param string $shownStructure
@return array the sections
Get the sections of the current extension s structure