private function applyOrdering()
    {
        if (empty($this->menu)
            || $this->orderingApplied
        ) {
            return;
        }

        uasort($this->menu, array($this, 'menuCompare'));
        foreach ($this->menu as $key => &$element) {
            if (is_null($element)) {
                unset($this->menu[$key]);
            } elseif ($element['_hasSubmenu']) {
                uasort($element, array($this, 'menuCompare'));
            }
        }

        $this->orderingApplied = true;
    }
private function applyOrdering()
    {
        if (empty($this->menu)
            || $this->orderingApplied
        ) {
            return;
        }

        uasort($this->menu, array($this, 'menuCompare'));
        foreach ($this->menu as $key => &$element) {
            if (is_null($element)) {
                unset($this->menu[$key]);
            } elseif ($element['_hasSubmenu']) {
                uasort($element, array($this, 'menuCompare'));
            }
        }

        $this->orderingApplied = true;
    }
private function applyOrdering ( ) { if ( empty ( $ this -> menu ) || $ this -> orderingApplied ) { return ; } uasort ( $ this -> menu , array ( $ this , 'menuCompare' ) ) ; foreach ( $ this -> menu as $ key => & $ element ) { if ( is_null ( $ element ) ) { unset ( $ this -> menu [ $ key ] ) ; } elseif ( $ element [ '_hasSubmenu' ] ) { uasort ( $ element , array ( $ this , 'menuCompare' ) ) ; } } $ this -> orderingApplied = true ; }
Orders the menu according to their order.
Orders the menu according to their order .