示例#1
0
 public function actionSave()
 {
     if (isset($_POST['data'])) {
         $data = Json::decode($_POST['data']);
         Menu::updateItems($data);
     }
 }
示例#2
0
 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');
 }
示例#3
0
 public function down()
 {
     $this->dropTable(Menu::tableName());
     $this->dropTable(Menuitem::tableName());
 }