public function actionSave() { if (isset($_POST['data'])) { $data = Json::decode($_POST['data']); Menu::updateItems($data); } }
public function getItems() { $app_id = \Yii::$app->getModule('cms')->app_id; return ArrayHelper::map(Menu::find()->where(['app_id' => (string) $app_id])->all(), 'id', 'description2'); }
public function down() { $this->dropTable(Menu::tableName()); $this->dropTable(Menuitem::tableName()); }