private function filterParents($menuLinks)
    {
        $tmp = [];
        foreach($menuLinks as $key => $menuLink){
            if(isset($menuLink['parent']) && !$menuLink['parent']) {
                $tmp[$key] = $menuLink;
            }
        }
        return $tmp;
    }
private function filterParents($menuLinks)
    {
        $tmp = [];
        foreach($menuLinks as $key => $menuLink){
            if(isset($menuLink['parent']) && !$menuLink['parent']) {
                $tmp[$key] = $menuLink;
            }
        }
        return $tmp;
    }
private function filterParents ( $ menuLinks ) { $ tmp = [ ] ; foreach ( $ menuLinks as $ key => $ menuLink ) { if ( isset ( $ menuLink [ 'parent' ] ) && ! $ menuLink [ 'parent' ] ) { $ tmp [ $ key ] = $ menuLink ; } } return $ tmp ; }
Remove children links from first dimension of array.

@param  array|object $menuLinks
@return array
Remove children links from first dimension of array .