/** * Sestavý validní HTML kód */ public function build() { if ($this->label !== null && $this->label instanceof LabelControl) { $this->html .= $this->label->render(); } if (!empty($this->value) && $this->showValue) { $this->addAttribute(new KeyPairValue('value', $this->value)); } foreach ($this->rules as $rule) { $this->addAttribute($rule); } parent::build(); return $this; }
/** * Sestaví formulář * * @return $this */ public function build() { $this->addAttribute(new KeyPairValue('method', $this->method)); return parent::build(); }