/** * @param array $panes * @param array $attribs * @return string */ public function render(array $panes, array $attribs = []) { $markup = ''; if ($header) { $markup .= sprintf($this->headingOpenTag, $this->htmlAttribs($this->headingAttributes)); $markup .= $header; $markup .= $this->headingCloseTag; } $markup .= sprintf($this->bodyOpenTag, $this->htmlAttribs($this->bodyAttributes)); $markup .= $content; $markup .= $this->bodyCloseTag; if ($footer) { $markup .= sprintf($this->footerOpenTag, $this->htmlAttribs($this->footerAttributes)); $markup .= $footer; $markup .= $this->footerCloseTag; } return parent::render($markup, $attribs); }
/** * @param AbstractHelper $helper * @param array $argv * @return string */ protected function renderHelper(AbstractHelper $helper, array $argv) { if ($helper instanceof Translator\TranslatorAwareInterface) { $helperRollbackTextDomain = $helper->getTranslatorTextDomain(); $helper->setTranslatorTextDomain($this->getTranslatorTextDomain()); } $labelHelper = $this->getLabelHelper(); if ($labelHelper instanceof Translator\TranslatorAwareInterface) { $labelRollbackTextDomain = $labelHelper->getTranslatorTextDomain(); $labelHelper->setTranslatorTextDomain($this->getTranslatorTextDomain()); } $markup = call_user_func_array($helper, $argv); if (isset($helperRollbackTextDomain)) { $helper->setTranslatorTextDomain($helperRollbackTextDomain); } if (isset($labelRollbackTextDomain)) { $labelHelper->setTranslatorTextDomain($labelRollbackTextDomain); } return $markup; }