private function getShownStructure()
    {
        if($this->hasRequestParameter('shownStructure')){
            $structure = $this->getRequestParameter('shownStructure');
            $perspectives = \oat\tao\model\menu\MenuService::getAllPerspectives();
            foreach($perspectives as $perspective){
                if($perspective->getId() == $structure){
                    return $perspective->getId();
                }
            }
        }
        return null;
    }
private function getShownStructure()
    {
        if($this->hasRequestParameter('shownStructure')){
            $structure = $this->getRequestParameter('shownStructure');
            $perspectives = \oat\tao\model\menu\MenuService::getAllPerspectives();
            foreach($perspectives as $perspective){
                if($perspective->getId() == $structure){
                    return $perspective->getId();
                }
            }
        }
        return null;
    }
private function getShownStructure ( ) { if ( $ this -> hasRequestParameter ( 'shownStructure' ) ) { $ structure = $ this -> getRequestParameter ( 'shownStructure' ) ; $ perspectives = \ oat \ tao \ model \ menu \ MenuService :: getAllPerspectives ( ) ; foreach ( $ perspectives as $ perspective ) { if ( $ perspective -> getId ( ) == $ structure ) { return $ perspective -> getId ( ) ; } } } return null ; }
Get and validate the 'shownStructure' parameter
@return string the structure id if found in the list
Get and validate the shownStructure parameter