Created
April 7, 2016 08:38
-
-
Save mlebkowski/a24305e525a8411ce53a58da4a956397 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @inheritDoc | |
*/ | |
protected function renderCustomSearchView(NodeTranslation $nodeTranslation, SearchViewTemplateInterface $page) | |
{ | |
$view = $page->getSearchView(); | |
$renderContext = new RenderContext([ | |
'locale' => $nodeTranslation->getLang(), | |
'page' => $page, | |
'indexMode' => true | |
]); | |
if ($page instanceof PageInterface) { | |
$request = $this->container->get('request_stack')->getCurrentRequest(); | |
$page->service($this->container, $request, $renderContext); | |
} | |
$content = $this->removeHtml($this->container->get('templating')->render($view, $renderContext->getArrayCopy())); | |
return $content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment