コード例 #1
0
ファイル: SelectionWidget.php プロジェクト: openeyes/openeyes
 public function init()
 {
     parent::init();
     if (is_string($this->data)) {
         $this->data = SelectionHelper::listData($this->data, $this->element->{$this->field});
     }
 }
コード例 #2
0
ファイル: SliderTable.php プロジェクト: openeyes/openeyes
 public function init()
 {
     parent::init();
     $this->max = count($this->data) + 1;
     if (!$this->value) {
         $this->value = 1;
     }
 }
コード例 #3
0
ファイル: TextField.php プロジェクト: openeyes/openeyes
 public function init()
 {
     parent::init();
     if (array_key_exists('password', $this->htmlOptions)) {
         $this->htmlOptions['type'] = 'password';
     } elseif (!array_key_exists('type', $this->htmlOptions)) {
         $this->htmlOptions['type'] = 'text';
     }
 }
コード例 #4
0
 public function init()
 {
     parent::init();
     if (is_string($this->data)) {
         $class = $this->data;
         $lookup = $class::model();
         if ($lookup->asa('LookupTable')) {
             $lookup->activeOrPk($this->element->{$this->field});
         }
         $this->data = CHtml::listData($lookup->cache(60)->findAll(), $this->lookup_id_field, $this->lookup_name_field);
     }
 }
コード例 #5
0
ファイル: Slider.php プロジェクト: code-4-england/OpenEyes
 public function init()
 {
     parent::init();
     if ($this->null) {
         $this->max += 1;
         if ($this->value === null) {
             $this->value = 0;
             $this->value_display = 'NR';
         } else {
             $this->value_display = $this->value++;
         }
     } else {
         $this->value_display = $this->value;
     }
     if ($this->width && !preg_match('/[^0-9]/', $this->width)) {
         $this->width .= 'px';
     }
 }
コード例 #6
0
 public function init()
 {
     $this->buttonOptions = array_merge($this->defaultButtonOptions, $this->buttonOptions);
     return parent::init();
 }