Exemple #1
0
 protected function setupGrid()
 {
     $this->trigger(self::EVENT_SETUP_GRID);
     if ($this->runInConsoleMode == false) {
         $pageSize = UserSetting::get(Yii::$app->user->id, $this->getGridId() . '.pageSize');
         if ($pageSize !== null) {
             $this->dataProvider->getPagination()->pageSize = $pageSize;
         }
     }
 }
Exemple #2
0
 /**
  * @param $group
  * @param $name
  * @return UserSetting
  */
 public function getSetting($group, $name)
 {
     return UserSetting::get($this->id, $group, $name);
 }
 public function actionGet($name)
 {
     \Yii::$app->response->format = Response::FORMAT_JSON;
     return UserSetting::get(\Yii::$app->user->id, $name);
 }