src/Flowcode/PageBundle/Services/MenuService.php
public function reorder(Menu $menu, $field = 'position')
    {
        $roots = $this->menuItemRepository->getRootNodes();
        $rootItem = null;

        foreach ($roots as $root) {
            if ($root->getMenu() == $menu) {
                $rootItem = $root;
            }
        }

        if ($rootItem) {
            $this->menuItemRepository->reorder($rootItem, $field);
            return true;
        }

        return false;
    }
public function reorder(Menu $menu, $field = 'position')
    {
        $roots = $this->menuItemRepository->getRootNodes();
        $rootItem = null;

        foreach ($roots as $root) {
            if ($root->getMenu() == $menu) {
                $rootItem = $root;
            }
        }

        if ($rootItem) {
            $this->menuItemRepository->reorder($rootItem, $field);
            return true;
        }

        return false;
    }
public function reorder ( Menu $ menu , $ field = 'position' ) { $ roots = $ this -> menuItemRepository -> getRootNodes ( ) ; $ rootItem = null ; foreach ( $ roots as $ root ) { if ( $ root -> getMenu ( ) == $ menu ) { $ rootItem = $ root ; } } if ( $ rootItem ) { $ this -> menuItemRepository -> reorder ( $ rootItem , $ field ) ; return true ; } return false ; }
Reorder Menu tree.

@param Menu $menu
@param string $field
@return bool
Reorder Menu tree .