src/View/Helper/Navigation/Navbar.php
protected function isPageEmpty(AbstractPage $page)
    {
        if ($page->get('route')) {
            return false;
        }
        
        if (!$page->hasPages(true)) {
            return true;
        }
        
        $isGranted = $this->getView()->plugin('isGranted');
        foreach ($page->getPages() as $childPage) {
            if (!$childPage->isVisible()) {
                continue;
            }
            
            if ($isGranted($childPage->get('permission'))) {
                return false;
            }
        }
        
        return true;
    }
protected function isPageEmpty(AbstractPage $page)
    {
        if ($page->get('route')) {
            return false;
        }
        
        if (!$page->hasPages(true)) {
            return true;
        }
        
        $isGranted = $this->getView()->plugin('isGranted');
        foreach ($page->getPages() as $childPage) {
            if (!$childPage->isVisible()) {
                continue;
            }
            
            if ($isGranted($childPage->get('permission'))) {
                return false;
            }
        }
        
        return true;
    }
protected function isPageEmpty ( AbstractPage $ page ) { if ( $ page -> get ( 'route' ) ) { return false ; } if ( ! $ page -> hasPages ( true ) ) { return true ; } $ isGranted = $ this -> getView ( ) -> plugin ( 'isGranted' ) ; foreach ( $ page -> getPages ( ) as $ childPage ) { if ( ! $ childPage -> isVisible ( ) ) { continue ; } if ( $ isGranted ( $ childPage -> get ( 'permission' ) ) ) { return false ; } } return true ; }
Is the page empty?

@param  AbstractPage $page Page to check
@return boolean
Is the page empty?