public function resolve(MenuEntry $menu, Entity\Users $user)
    {
        foreach ($menu->children() as $name => $child) {
            $this->doResolve($menu, $child, $user);

            if ($child->children() === [] && $child->getUri() === null) {
                $menu->remove($name);
            }
        }
    }
public function resolve(MenuEntry $menu, Entity\Users $user)
    {
        foreach ($menu->children() as $name => $child) {
            $this->doResolve($menu, $child, $user);

            if ($child->children() === [] && $child->getUri() === null) {
                $menu->remove($name);
            }
        }
    }
public function resolve ( MenuEntry $ menu , Entity \ Users $ user ) { foreach ( $ menu -> children ( ) as $ name => $ child ) { $ this -> doResolve ( $ menu , $ child , $ user ) ; if ( $ child -> children ( ) === [ ] && $ child -> getUri ( ) === null ) { $ menu -> remove ( $ name ) ; } } }
Resolve the access permissions on each menu child recursively, and
remove the child if access is not granted. Should a parent have no
remaining children & isn't routed, it should then be removed.

@param MenuEntry    $menu
@param Entity\Users $user
Resolve the access permissions on each menu child recursively and remove the child if access is not granted . Should a parent have no remaining children & isn t routed it should then be removed .