src/Kunstmaan/NodeSearchBundle/Configuration/NodePagesConfiguration.php
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;
    }
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;
    }
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
Render a custom search view