src/Kunstmaan/NodeSearchBundle/Configuration/NodePagesConfiguration.php
protected function addPageContent(NodeTranslation $nodeTranslation, $page, &$doc)
    {
        $this->enterRequestScope($nodeTranslation->getLang());
        if ($this->logger) {
            $this->logger->debug(
                sprintf(
                    'Indexing page "%s" / lang : %s / type : %s / id : %d / node id : %d',
                    $page->getTitle(),
                    $nodeTranslation->getLang(),
                    get_class($page),
                    $page->getId(),
                    $nodeTranslation->getNode()->getId()
                )
            );
        }

        $renderer = $this->container->get('templating');
        $doc['content'] = '';

        if ($page instanceof SearchViewTemplateInterface) {
            $doc['content'] = $this->renderCustomSearchView($nodeTranslation, $page, $renderer);

            return null;
        }

        if ($page instanceof HasPagePartsInterface) {
            $doc['content'] = $this->renderDefaultSearchView($nodeTranslation, $page, $renderer);

            return null;
        }
    }
protected function addPageContent(NodeTranslation $nodeTranslation, $page, &$doc)
    {
        $this->enterRequestScope($nodeTranslation->getLang());
        if ($this->logger) {
            $this->logger->debug(
                sprintf(
                    'Indexing page "%s" / lang : %s / type : %s / id : %d / node id : %d',
                    $page->getTitle(),
                    $nodeTranslation->getLang(),
                    get_class($page),
                    $page->getId(),
                    $nodeTranslation->getNode()->getId()
                )
            );
        }

        $renderer = $this->container->get('templating');
        $doc['content'] = '';

        if ($page instanceof SearchViewTemplateInterface) {
            $doc['content'] = $this->renderCustomSearchView($nodeTranslation, $page, $renderer);

            return null;
        }

        if ($page instanceof HasPagePartsInterface) {
            $doc['content'] = $this->renderDefaultSearchView($nodeTranslation, $page, $renderer);

            return null;
        }
    }
protected function addPageContent ( NodeTranslation $ nodeTranslation , $ page , & $ doc ) { $ this -> enterRequestScope ( $ nodeTranslation -> getLang ( ) ) ; if ( $ this -> logger ) { $ this -> logger -> debug ( sprintf ( 'Indexing page "%s" / lang : %s / type : %s / id : %d / node id : %d' , $ page -> getTitle ( ) , $ nodeTranslation -> getLang ( ) , get_class ( $ page ) , $ page -> getId ( ) , $ nodeTranslation -> getNode ( ) -> getId ( ) ) ) ; } $ renderer = $ this -> container -> get ( 'templating' ) ; $ doc [ 'content' ] = '' ; if ( $ page instanceof SearchViewTemplateInterface ) { $ doc [ 'content' ] = $ this -> renderCustomSearchView ( $ nodeTranslation , $ page , $ renderer ) ; return null ; } if ( $ page instanceof HasPagePartsInterface ) { $ doc [ 'content' ] = $ this -> renderDefaultSearchView ( $ nodeTranslation , $ page , $ renderer ) ; return null ; } }
Add page content to the index document

@param NodeTranslation  $nodeTranslation
@param HasNodeInterface $page
@param array            $doc
Add page content to the index document