public function actionChangePageVersionLayout()
    {
        $params =  Yii::$app->request->bodyParams;
        $pageItemId = $params['pageItemId'];
        $layoutId =  $params['layoutId'];
        $alias =  $params['alias'];

        $model = NavItemPage::findOne(['id' => $pageItemId]);
        
        if ($model) {
            $model->forceNavItem->updateTimestamp();
            return $model->updateAttributes(['layout_id' => $layoutId, 'version_alias' => $alias]);
        }
        
        return false;
    }
public function actionChangePageVersionLayout()
    {
        $params =  Yii::$app->request->bodyParams;
        $pageItemId = $params['pageItemId'];
        $layoutId =  $params['layoutId'];
        $alias =  $params['alias'];

        $model = NavItemPage::findOne(['id' => $pageItemId]);
        
        if ($model) {
            $model->forceNavItem->updateTimestamp();
            return $model->updateAttributes(['layout_id' => $layoutId, 'version_alias' => $alias]);
        }
        
        return false;
    }
public function actionChangePageVersionLayout ( ) { $ params = Yii :: $ app -> request -> bodyParams ; $ pageItemId = $ params [ 'pageItemId' ] ; $ layoutId = $ params [ 'layoutId' ] ; $ alias = $ params [ 'alias' ] ; $ model = NavItemPage :: findOne ( [ 'id' => $ pageItemId ] ) ; if ( $ model ) { $ model -> forceNavItem -> updateTimestamp ( ) ; return $ model -> updateAttributes ( [ 'layout_id' => $ layoutId , 'version_alias' => $ alias ] ) ; } return false ; }
Change the layout of a page version.

@return number|boolean
Change the layout of a page version .