src/Charcoal/App/Handler/AbstractError.php
protected function parseTemplateData($data = [])
    {
        $error = $this->getThrown();

        $html = $this->renderHtmlError($error);
        while ($error = $error->getPrevious()) {
            $html .= '<h2>'.$this->translator()->translate('Previous error').'</h2>';
            $html .= $this->renderHtmlError($error);
        }

        $data['htmlErrorDetails']    = $html;
        $data['displayErrorDetails'] = $this->displayErrorDetails() && !empty($html);

        return parent::parseTemplateData($data);
    }
protected function parseTemplateData($data = [])
    {
        $error = $this->getThrown();

        $html = $this->renderHtmlError($error);
        while ($error = $error->getPrevious()) {
            $html .= '<h2>'.$this->translator()->translate('Previous error').'</h2>';
            $html .= $this->renderHtmlError($error);
        }

        $data['htmlErrorDetails']    = $html;
        $data['displayErrorDetails'] = $this->displayErrorDetails() && !empty($html);

        return parent::parseTemplateData($data);
    }
protected function parseTemplateData ( $ data = [ ] ) { $ error = $ this -> getThrown ( ) ; $ html = $ this -> renderHtmlError ( $ error ) ; while ( $ error = $ error -> getPrevious ( ) ) { $ html .= '<h2>' . $ this -> translator ( ) -> translate ( 'Previous error' ) . '</h2>' ; $ html .= $ this -> renderHtmlError ( $ error ) ; } $ data [ 'htmlErrorDetails' ] = $ html ; $ data [ 'displayErrorDetails' ] = $ this -> displayErrorDetails ( ) && ! empty ( $ html ) ; return parent :: parseTemplateData ( $ data ) ; }
Prepare the template data for rendering.

@param  mixed $data Raw template data.
@return array Expanded and processed template data.
Prepare the template data for rendering .