public static function moveToChild($moveNavId, $droppedOnItemId)
    {
        $move = self::findOne($moveNavId);
        $on = self::findOne($droppedOnItemId);
        
        if (!$move || !$on) {
            return false;
        }

        $response = self::checkDuplicateAlias($move->id, $on->id);
        
        if ($response !== true) {
            return $response;
        }

        $move->nav_container_id = $on->nav_container_id;
        $move->parent_nav_id = $on->id;
        $move->update();

        foreach ($move->getRecursiveChildren() as $child) {
            $child->updateAttributes(['nav_container_id' => $on->nav_container_id]);
        }
        
        return true;
    }
public static function moveToChild($moveNavId, $droppedOnItemId)
    {
        $move = self::findOne($moveNavId);
        $on = self::findOne($droppedOnItemId);
        
        if (!$move || !$on) {
            return false;
        }

        $response = self::checkDuplicateAlias($move->id, $on->id);
        
        if ($response !== true) {
            return $response;
        }

        $move->nav_container_id = $on->nav_container_id;
        $move->parent_nav_id = $on->id;
        $move->update();

        foreach ($move->getRecursiveChildren() as $child) {
            $child->updateAttributes(['nav_container_id' => $on->nav_container_id]);
        }
        
        return true;
    }
public static function moveToChild ( $ moveNavId , $ droppedOnItemId ) { $ move = self :: findOne ( $ moveNavId ) ; $ on = self :: findOne ( $ droppedOnItemId ) ; if ( ! $ move || ! $ on ) { return false ; } $ response = self :: checkDuplicateAlias ( $ move -> id , $ on -> id ) ; if ( $ response !== true ) { return $ response ; } $ move -> nav_container_id = $ on -> nav_container_id ; $ move -> parent_nav_id = $ on -> id ; $ move -> update ( ) ; foreach ( $ move -> getRecursiveChildren ( ) as $ child ) { $ child -> updateAttributes ( [ 'nav_container_id' => $ on -> nav_container_id ] ) ; } return true ; }
Move a nav model to a child.

@param integer $moveNavId
@param integer $droppedOnItemId
@return boolean|boolean|mixed
Move a nav model to a child .