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