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;
     }
 }
示例#2
0
文件: Tag.php 项目: sharenjoy/axes
 public function grabTagtypeLists()
 {
     return trans_options('options.tag_type');
 }
示例#3
0
文件: Post.php 项目: sharenjoy/axes
 public function grabPosttypeLists()
 {
     return trans_options('options.post_type');
 }
示例#4
0
 public function grabCarouseltypeLists()
 {
     return trans_options('options.carousel_type');
 }