public function init() { parent::init(); if (is_string($this->data)) { $this->data = SelectionHelper::listData($this->data, $this->element->{$this->field}); } }
public function init() { parent::init(); $this->max = count($this->data) + 1; if (!$this->value) { $this->value = 1; } }
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'; } }
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); } }
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'; } }
public function init() { $this->buttonOptions = array_merge($this->defaultButtonOptions, $this->buttonOptions); return parent::init(); }