/** * @inheritDoc * @todo: remove after PR #1108 is merged * * @see https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1108 */ protected function renderCustomSearchView(NodeTranslation $nodeTranslation, SearchViewTemplateInterface $page, EngineInterface $renderer) { $view = $page->getSearchView(); $renderContext = new RenderContext(['locale' => $nodeTranslation->getLang(), 'page' => $page, 'indexMode' => true, 'nodetranslation' => $nodeTranslation]); if ($page instanceof PageInterface) { $request = $this->container->get('request_stack')->getCurrentRequest(); $page->service($this->container, $request, $renderContext); } $content = $this->removeHtml($renderer->render($view, $renderContext->getArrayCopy())); return $content; }
/** * Render a custom search view * * @param NodeTranslation $nodeTranslation * @param SearchViewTemplateInterface $page * @param EngineInterface $renderer * * @return string */ protected function renderCustomSearchView(NodeTranslation $nodeTranslation, SearchViewTemplateInterface $page, EngineInterface $renderer) { $view = $page->getSearchView(); $content = $this->removeHtml($renderer->render($view, array('locale' => $nodeTranslation->getLang(), 'page' => $page, 'indexMode' => true))); return $content; }