/** * FormElement constructor * * @param string $formName Název formuláře * @param string $method HTTP metoda, kterou se má formulář odeslat. Výchozí: post */ public function __construct($formName, $method = self::METHOD_POST) { parent::__construct(self::SIGN); $this->setName($formName); $this->setMethod($method); $hidden = (new HiddenInput('form-name'))->setValue($formName); $this->addContent($hidden); $this->postBack = $this->existKey('form-name') && $this->getData('form-name') == $formName; return $this; }
/** * @param string $sign Značka elementu * * @param string|null $name Název kontrolky * @param AElement|string|null $label Popisek */ public function __construct($sign, $name = null, $label = null) { parent::__construct($sign); $this->setName($name); $this->setID($name); if ($label !== null) { if (is_string($label)) { $label = new LabelControl($label); } $this->label = $label; $this->label->setFor($name); } 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; }
/** * LineBreakElement constructor */ public function __construct() { parent::__construct(self::SIGN, null); $this->pair = false; return $this; }