public function actionManage()
 {
     $model = new Menu(ActiveRecord::SCENARIO_SEARCH);
     $model->unsetAttributes();
     if (isset($_GET['Menu'])) {
         $model->attributes = $_GET['Menu'];
     }
     $this->render('manage', ['model' => $model]);
 }
Beispiel #2
0
 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     $model = new Menu('search');
     $model->unsetAttributes();
     if (isset($_GET['Menu'])) {
         $model->attributes = $_GET['Menu'];
     }
     $this->render('index', array('model' => $model));
 }
Beispiel #3
0
 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     $this->addToolbar();
     $model = new Menu('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Menu'])) {
         $model->attributes = $_GET['Menu'];
     }
     $this->render('index', array('model' => $model));
 }
 public function actionAdmin()
 {
     $lang = $this->getLanguageCode();
     $listMenuIds = MenuType::model()->findAll();
     $menutype_id = empty($listMenuIds) ? NULL : $listMenuIds[0]['id'];
     if (Yii::app()->request->getParam('id')) {
         $menutype_id = Yii::app()->request->getParam('id');
     }
     $model = new Menu();
     $model->unsetAttributes();
     $listMenu = $model->getListMenu($lang, $menutype_id);
     $tree = Yii::app()->extraFunctions->parseTree($listMenu);
     $this->render('admin', array('tree' => json_encode($tree), 'listMenuId' => $listMenuIds, 'menutype_id' => $menutype_id));
 }
Beispiel #5
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     Yii::app()->bootstrap->registerJS();
     Yii::app()->bootstrap->registerJSBackend();
     $model = new Menu('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Menu'])) {
         $model->attributes = $_GET['Menu'];
     }
     //phan trang dang dropdown
     if (isset($_GET['pageSize'])) {
         Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
         unset($_GET['pageSize']);
     }
     $this->render('admin', array('model' => $model));
 }
 /**
  * Управление блогами.
  *
  * @return void
  */
 public function actionIndex()
 {
     $model = new Menu('search');
     $model->unsetAttributes();
     // clear any default values
     $model->setAttributes(Yii::app()->getRequest()->getParam('Menu', []));
     $this->render('index', ['model' => $model]);
 }
Beispiel #7
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Menu('search');
     $menulist = Menu::getDropList(0);
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Menu'])) {
         $model->attributes = $_GET['Menu'];
     }
     $this->render('admin', array('model' => $model, 'menulist' => $menulist));
 }
 public function actionExport()
 {
     $model = new Menu();
     $model->unsetAttributes();
     // clear any default values
     if (isset($_POST['Menu'])) {
         $model->attributes = $_POST['Menu'];
     }
     $exportType = $_POST['fileType'];
     $this->widget('ext.heart.export.EHeartExport', array('title' => 'List of Menu', 'dataProvider' => $model->search(), 'filter' => $model, 'grid_mode' => 'export', 'exportType' => $exportType, 'columns' => array('menu_id', 'just_id', 'type')));
 }