public function checkValidPagesRecursive($siteMenu = array())
    {
        $checkedSiteMenu = array();
        
        foreach($siteMenu as $key => $val){
            
            if($val['menu'] != 'NONE'){
                
                if($val['menu'] == 'NOLINK'){
                    $val['uri'] = '#';
                }
                
                if(!empty($val['pages'])){
                    
                   $pages  = $this->checkValidPagesRecursive($val['pages']);
                   
                   if(!empty($pages)){
                       $val['pages'] = $pages;
                   }
                }
                
                $checkedSiteMenu[] = $val;
            }
            
        }
        
        return $checkedSiteMenu;
    }
public function checkValidPagesRecursive($siteMenu = array())
    {
        $checkedSiteMenu = array();
        
        foreach($siteMenu as $key => $val){
            
            if($val['menu'] != 'NONE'){
                
                if($val['menu'] == 'NOLINK'){
                    $val['uri'] = '#';
                }
                
                if(!empty($val['pages'])){
                    
                   $pages  = $this->checkValidPagesRecursive($val['pages']);
                   
                   if(!empty($pages)){
                       $val['pages'] = $pages;
                   }
                }
                
                $checkedSiteMenu[] = $val;
            }
            
        }
        
        return $checkedSiteMenu;
    }
public function checkValidPagesRecursive ( $ siteMenu = array ( ) ) { $ checkedSiteMenu = array ( ) ; foreach ( $ siteMenu as $ key => $ val ) { if ( $ val [ 'menu' ] != 'NONE' ) { if ( $ val [ 'menu' ] == 'NOLINK' ) { $ val [ 'uri' ] = '#' ; } if ( ! empty ( $ val [ 'pages' ] ) ) { $ pages = $ this -> checkValidPagesRecursive ( $ val [ 'pages' ] ) ; if ( ! empty ( $ pages ) ) { $ val [ 'pages' ] = $ pages ; } } $ checkedSiteMenu [ ] = $ val ; } } return $ checkedSiteMenu ; }
This method checks the show menu option of the page,
This method checks the show menu option of the page