Skip to content

Commit

Permalink
Support submit button value retrieve in protected
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb committed Jan 2, 2020
1 parent f9ef44b commit 1ba5e59
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/Form/FormSubmitDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,19 @@ public function setValue(string $value)
return $this;
}

protected function _getValue()
{
return $this->_value;
}

protected function _getContentForRender()
{
return Div::create(
Input::create()->setType(Input::TYPE_SUBMIT)->setValue($this->_value)
)->addClass('p-form--submit');
return Div::create($this->_input())->addClass('p-form--submit');
}

protected function _input()
{
return Input::create()->setType(Input::TYPE_SUBMIT)->setValue($this->_getValue());
}

protected function _prepareForProduce(): HtmlElement
Expand Down

0 comments on commit 1ba5e59

Please sign in to comment.