Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.