public function save()
 {
     if ($this->validate()) {
         UserSetting::set($this->userId, $this->gridId . '.pageSize', $this->pageSize);
         return true;
     } else {
         return false;
     }
 }
Exemple #2
0
 /**
  * @param $group
  * @param $name
  * @param $value
  */
 public function addSetting($group, $name, $value)
 {
     UserSetting::set($this->id, $group, $name, $value);
 }
 public function actionSet($name, $value)
 {
     \Yii::$app->response->format = Response::FORMAT_JSON;
     UserSetting::set(\Yii::$app->user->id, $name, $value);
     return ['result' => true];
 }