protected function EmailHandler::renderInNewContext in Easy Email 8
Same name and namespace in other branches
- 2.0.x src/Service/EmailHandler.php \Drupal\easy_email\Service\EmailHandler::renderInNewContext()
Parameters
array $build:
Return value
string
File
- src/
Service/ EmailHandler.php, line 425
Class
Namespace
Drupal\easy_email\ServiceCode
protected function renderInNewContext($build, $plain_text = FALSE) {
return $this->renderer
->executeInRenderContext(new RenderContext(), function () use ($build, $plain_text) {
if ($plain_text) {
return PlainTextOutput::renderFromHtml($this->renderer
->renderPlain($build));
}
return $this->renderer
->render($build);
});
}