Skip to content

Commit

Permalink
Support retrieving rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb committed Jan 3, 2020
1 parent 1ba5e59 commit f4d977c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Decorators/AbstractDataHandlerDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ abstract class AbstractDataHandlerDecorator extends AbstractDecorator implements

protected $_formatCallback;

protected $_rendered;

public function __construct()
{
$this->_formatCallback = function ($return) { return $return; };
Expand Down Expand Up @@ -91,7 +93,13 @@ protected function _getContentForRender()

$errorTag = $this->_getErrorElement();
$callback = $this->_formatCallback;
return $callback($this->_formatElements($input, $this->_label, $errorTag));
$this->_rendered = $callback($this->_formatElements($input, $this->_label, $errorTag));
return $this->getElements();
}

public function getElements()
{
return $this->_rendered;
}

protected function _configureInputElement(HtmlElement $input)
Expand Down

0 comments on commit f4d977c

Please sign in to comment.