Menu/MenuBuilder.php
public function createAccountMenu()
    {
        $menu = $this->factory->createItem('root');

        uasort($this->accountEntries, function($a, $b) {
            if ($a['position'] == $b['position']) {
                return 0;
            }
            return $a['position'] < $b['position'] ? -1 : 1;
        });

        foreach($this->accountEntries as $name => $options) {
            $menu->addChild($name, $options);
        }

        return $menu;
    }
public function createAccountMenu()
    {
        $menu = $this->factory->createItem('root');

        uasort($this->accountEntries, function($a, $b) {
            if ($a['position'] == $b['position']) {
                return 0;
            }
            return $a['position'] < $b['position'] ? -1 : 1;
        });

        foreach($this->accountEntries as $name => $options) {
            $menu->addChild($name, $options);
        }

        return $menu;
    }
public function createAccountMenu ( ) { $ menu = $ this -> factory -> createItem ( 'root' ) ; uasort ( $ this -> accountEntries , function ( $ a , $ b ) { if ( $ a [ 'position' ] == $ b [ 'position' ] ) { return 0 ; } return $ a [ 'position' ] < $ b [ 'position' ] ? - 1 : 1 ; } ) ; foreach ( $ this -> accountEntries as $ name => $ options ) { $ menu -> addChild ( $ name , $ options ) ; } return $ menu ; }
Creates the account menu.

@return \Knp\Menu\ItemInterface
Creates the account menu .