public function actionMoveBefore($moveItemId, $droppedBeforeItemId)
    {
        $result = Nav::moveToBefore($moveItemId, $droppedBeforeItemId);
        
        if ($result !== true) {
            Yii::$app->response->setStatusCode(422, 'Found URL alias duplication in drop target "'.$result['title'].'".');
        }
        
        return ['success' => $result];
    }
public function actionMoveBefore($moveItemId, $droppedBeforeItemId)
    {
        $result = Nav::moveToBefore($moveItemId, $droppedBeforeItemId);
        
        if ($result !== true) {
            Yii::$app->response->setStatusCode(422, 'Found URL alias duplication in drop target "'.$result['title'].'".');
        }
        
        return ['success' => $result];
    }
public function actionMoveBefore ( $ moveItemId , $ droppedBeforeItemId ) { $ result = Nav :: moveToBefore ( $ moveItemId , $ droppedBeforeItemId ) ; if ( $ result !== true ) { Yii :: $ app -> response -> setStatusCode ( 422 , 'Found URL alias duplication in drop target "' . $ result [ 'title' ] . '".' ) ; } return [ 'success' => $ result ] ; }
Move an item before an existing item.

@param integer $moveItemId
@param integer $droppedBeforeItemId
@return array
Move an item before an existing item .