protected function setOption()
 {
     $this->option = null;
     if ($this->type) {
         if (isset($this->setting['option']) && !is_null($this->setting['option'])) {
             $option = $this->setting['option'];
             if (is_array($option)) {
                 $this->option = $option;
             } elseif (is_string($option)) {
                 $this->option = trans_options($option);
                 if (!$this->option) {
                     $this->option = trans_options('options.' . $option);
                 }
             }
         } else {
             $this->option = Config::get('options.' . $this->name) ?: Config::get('options.yesno');
         }
     }
     if (isset($this->setting['pleaseSelect']) && $this->setting['pleaseSelect'] === true) {
         $this->option = ['0' => pick_trans('option.pleaseSelect')] + $this->option;
     }
 }
Exemple #2
0
 public function grabTagtypeLists()
 {
     return trans_options('options.tag_type');
 }
Exemple #3
0
 public function grabPosttypeLists()
 {
     return trans_options('options.post_type');
 }
Exemple #4
0
 public function grabCarouseltypeLists()
 {
     return trans_options('options.carousel_type');
 }