public static function moveToContainer($moveNavId, $toCatId)
    {
        $move = self::findOne($moveNavId);

        $move->nav_container_id = $toCatId;
        $move->parent_nav_id = 0;
        $move->update();

        foreach ($move->getRecursiveChildren() as $child) {
            $child->updateAttributes(['nav_container_id' => $toCatId]);
        }
        
        return true;
    }
public static function moveToContainer($moveNavId, $toCatId)
    {
        $move = self::findOne($moveNavId);

        $move->nav_container_id = $toCatId;
        $move->parent_nav_id = 0;
        $move->update();

        foreach ($move->getRecursiveChildren() as $child) {
            $child->updateAttributes(['nav_container_id' => $toCatId]);
        }
        
        return true;
    }
public static function moveToContainer ( $ moveNavId , $ toCatId ) { $ move = self :: findOne ( $ moveNavId ) ; $ move -> nav_container_id = $ toCatId ; $ move -> parent_nav_id = 0 ; $ move -> update ( ) ; foreach ( $ move -> getRecursiveChildren ( ) as $ child ) { $ child -> updateAttributes ( [ 'nav_container_id' => $ toCatId ] ) ; } return true ; }
Move a nav model to a container.

@param integer $moveNavId
@param integer $toCatId
@return boolean
Move a nav model to a container .