/** * 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; }
/** * AnchorElement constructor * * @param AElement[]|AElement|string|null $content */ public function __construct($content = null) { parent::__construct(self::SIGN, $content); return $this; }
public function __construct($items = null) { parent::__construct(self::SIGN); $this->setItems($items); return $this; }
/** * Nastaví obsah * * @param $content AElement|string|array Obsah elementu * @return $this */ public function addContent($content) { parent::addContent($content); if (is_array($content)) { foreach ($content as $c) { $this->addFormContent($c); } } else { $this->addFormContent($content); } }
/** * LineBreakElement constructor */ public function __construct() { parent::__construct(self::SIGN, null); $this->pair = false; return $this; }