Example #1
0
 /**
  * Loads settings for section
  * @param string $section
  * @return SettingForm
  */
 public function loadBySection($section = 'general')
 {
     $models = Setting::find()->where(['section' => $section])->indexBy('key')->orderBy('position ASC')->all();
     if (!empty($models)) {
         $this->_settingModels = $models;
         return true;
     }
     return false;
 }