public function getMenuItems(): array
    {
        usort($this->menuItems, function ($a, $b) {
            return $a->getOrder() > $b->getOrder();
        });

        return $this->menuItems;
    }
public function getMenuItems(): array
    {
        usort($this->menuItems, function ($a, $b) {
            return $a->getOrder() > $b->getOrder();
        });

        return $this->menuItems;
    }
public function getMenuItems ( ) : array { usort ( $ this -> menuItems , function ( $ a , $ b ) { return $ a -> getOrder ( ) > $ b -> getOrder ( ) ; } ) ; return $ this -> menuItems ; }
Returns the menu items.

@return array List of menu items
Returns the menu items .