/** * @param string $title * @param string $action * @param string $method [optional] * @param string $encType [optional] */ public function __construct($title, $action, $method = DefaultAttributeValues::METHOD_POST, $encType = DefaultAttributeValues::ENC_TYPE_URL_ENCODED) { parent::__construct(); $this->formEl = $this->createFormBlock($title, $action, $method, $encType); $this->formInnerContainerEl = $this->domDocument->createElement(Element::DIV); $this->formEl->appendChild($this->formInnerContainerEl); }
/** * @param string[] $colNames * @param bool $tableHasActions */ function __construct($colNames, $tableHasActions) { parent::__construct(); $this->colNames = $colNames; $this->tableHasActions = $tableHasActions; if ($tableHasActions) { $this->isUpdateButtonDisplayed = true; $this->isDeleteButtonDisplayed = true; } else { $this->isUpdateButtonDisplayed = false; $this->isDeleteButtonDisplayed = false; } $this->listContainerEl = $this->domDocument->createElement(Element::TABLE_BODY); }