/** * creates a new nav_item entry for the type page (it means nav_id will be delivered). */ public function actionCreatePageItem() { Yii::$app->menu->flushCache(); $model = new \cmsadmin\models\Nav(); $create = $model->createPageItem($this->postArg('nav_id'), $this->postArg('lang_id'), $this->postArg('title'), $this->postArg('alias'), $this->postArg('layout_id'), $this->postArg('description')); if ($create !== true) { Yii::$app->response->statusCode = 422; } return $create; }