src/View/Helper/Navigation/Navbar.php
protected function createNavbarMenuItemClass(AbstractPage $page, $addClassToLi, $depth)
    {
        // Render li tag and page
        $liClasses = [];

        // Is page active
        if ($page->isActive()) {
            $liClasses[] = 'active';
        }

        // Does page have children
        if ($page->hasPages() && $depth < self::MAX_RENDER_DEPTH) {
            $liClasses[] = 'dropdown';
        }

        // Add page class
        if ($addClassToLi && $page->getClass()) {
            $liClasses[] = $page->getClass();
        }

        // Create li
        if ($liClasses) {
            return ' class="' . implode(' ', $liClasses) . '"';
        }

        return '';
    }
protected function createNavbarMenuItemClass(AbstractPage $page, $addClassToLi, $depth)
    {
        // Render li tag and page
        $liClasses = [];

        // Is page active
        if ($page->isActive()) {
            $liClasses[] = 'active';
        }

        // Does page have children
        if ($page->hasPages() && $depth < self::MAX_RENDER_DEPTH) {
            $liClasses[] = 'dropdown';
        }

        // Add page class
        if ($addClassToLi && $page->getClass()) {
            $liClasses[] = $page->getClass();
        }

        // Create li
        if ($liClasses) {
            return ' class="' . implode(' ', $liClasses) . '"';
        }

        return '';
    }
protected function createNavbarMenuItemClass ( AbstractPage $ page , $ addClassToLi , $ depth ) { // Render li tag and page $ liClasses = [ ] ; // Is page active if ( $ page -> isActive ( ) ) { $ liClasses [ ] = 'active' ; } // Does page have children if ( $ page -> hasPages ( ) && $ depth < self :: MAX_RENDER_DEPTH ) { $ liClasses [ ] = 'dropdown' ; } // Add page class if ( $ addClassToLi && $ page -> getClass ( ) ) { $ liClasses [ ] = $ page -> getClass ( ) ; } // Create li if ( $ liClasses ) { return ' class="' . implode ( ' ' , $ liClasses ) . '"' ; } return '' ; }
Create navbar menu item class

@param  AbstractPage $page         Page being rendered
@param  boolean      $addClassToLi Whether to add the page class to the
li, or leave it for the a
$param  integer      $depth        Current iteration depth
@return string
Create navbar menu item class