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