private function setParentID($newMenuLinksID)
    {
        $tmp = [];
        foreach ($this->existingMenuLinks as $menuLink){
            $isParentNewLink = strstr($menuLink['parent'], 'NEW');
            if($isParentNewLink) {
                $menuLink['parent'] = $newMenuLinksID[$menuLink['parent']];
            }
            $tmp[] = $menuLink;
        }
        return $tmp;
    }
private function setParentID($newMenuLinksID)
    {
        $tmp = [];
        foreach ($this->existingMenuLinks as $menuLink){
            $isParentNewLink = strstr($menuLink['parent'], 'NEW');
            if($isParentNewLink) {
                $menuLink['parent'] = $newMenuLinksID[$menuLink['parent']];
            }
            $tmp[] = $menuLink;
        }
        return $tmp;
    }
private function setParentID ( $ newMenuLinksID ) { $ tmp = [ ] ; foreach ( $ this -> existingMenuLinks as $ menuLink ) { $ isParentNewLink = strstr ( $ menuLink [ 'parent' ] , 'NEW' ) ; if ( $ isParentNewLink ) { $ menuLink [ 'parent' ] = $ newMenuLinksID [ $ menuLink [ 'parent' ] ] ; } $ tmp [ ] = $ menuLink ; } return $ tmp ; }
Used to replace the parent of menu links that exists in DB but have parent a new menu link.
So after inserting the new menu links in database we get their ID and use them if their are parents of existing menu links.

@param  array $newMenuLinksID ids of new menu links inserted in database
@return array Returns menu links that exist in db with updated parents
Used to replace the parent of menu links that exists in DB but have parent a new menu link . So after inserting the new menu links in database we get their ID and use them if their are parents of existing menu links .