/** * Generates control's HTML element. * @return NHtml */ public function getControl() { $control = parent::getControl(); foreach ($this->getRules() as $rule) { if ($rule->isNegative || $rule->type !== NRule::VALIDATOR) { } elseif ($rule->operation === NForm::RANGE && $control->type !== 'text') { list($control->min, $control->max) = $rule->arg; } elseif ($rule->operation === NForm::PATTERN) { $control->pattern = $rule->arg; } } if ($control->type !== 'password') { $control->value = $this->getValue() === '' ? $this->translate($this->emptyValue) : $this->value; } return $control; }
public function getControl($label = NULL) { return parent::getControl(); }
public function getInput() { $control = parent::getControl(); $control->value = $this->value === '' ? $this->emptyValue : $this->tmpValue; return $control; }
/** * Generates control's HTML element. * @return NHtml */ public function getControl() { $control = parent::getControl(); $control->setText($this->getValue() === '' ? $this->translate($this->emptyValue) : $this->value); return $control; }
function getControl() { $control = parent::getControl(); if ($this->control->type !== 'password') { $control->value = $this->getValue() === '' ? $this->translate($this->emptyValue) : $this->value; } return $control; }