Redaxscript\Html\Form::_createButton PHP Method

_createButton() protected method

create the button
Since: 2.6.0
protected _createButton ( string $type = null, string $text = null, array $attributeArray = [] ) : Form
$type string type of the button
$text string text of the button
$attributeArray array attributes of the button
return Form
    protected function _createButton($type = null, $text = null, $attributeArray = [])
    {
        if (is_array($attributeArray)) {
            $attributeArray = array_merge($this->_attributeArray['button'][$type], $attributeArray);
        } else {
            $attributeArray = $this->_attributeArray['button'][$type];
        }
        $buttonElement = new Element();
        $buttonElement->init('button', $attributeArray)->text($text ? $text : $this->_language->get($this->_languageArray['button'][$type]));
        $this->append($buttonElement);
        return $this;
    }