public function updateIdxPage(Page $page = null, AbstractClassContent $content = null)
    {
        if (null === $page) {
            return $this;
        }

        if (null === $content) {
            $content = $page->getContentSet();
        }

        $query = 'INSERT INTO idx_page_content (page_uid, content_uid) '.
                '(SELECT :page, subcontent_uid FROM idx_content_content WHERE content_uid = :content) '.
                'UNION DISTINCT (SELECT :page, content_uid FROM idx_content_content WHERE subcontent_uid = :content)';

        $params = array(
            'page' => $page->getUid(),
            'content' => $content->getUid(),
        );

        return $this->removeIdxContentPage($content, $page)
                        ->executeUpdate($query, $params)
                        ->replaceIdxSite($page);
    }
public function updateIdxPage(Page $page = null, AbstractClassContent $content = null)
    {
        if (null === $page) {
            return $this;
        }

        if (null === $content) {
            $content = $page->getContentSet();
        }

        $query = 'INSERT INTO idx_page_content (page_uid, content_uid) '.
                '(SELECT :page, subcontent_uid FROM idx_content_content WHERE content_uid = :content) '.
                'UNION DISTINCT (SELECT :page, content_uid FROM idx_content_content WHERE subcontent_uid = :content)';

        $params = array(
            'page' => $page->getUid(),
            'content' => $content->getUid(),
        );

        return $this->removeIdxContentPage($content, $page)
                        ->executeUpdate($query, $params)
                        ->replaceIdxSite($page);
    }
public function updateIdxPage ( Page $ page = null , AbstractClassContent $ content = null ) { if ( null === $ page ) { return $ this ; } if ( null === $ content ) { $ content = $ page -> getContentSet ( ) ; } $ query = 'INSERT INTO idx_page_content (page_uid, content_uid) ' . '(SELECT :page, subcontent_uid FROM idx_content_content WHERE content_uid = :content) ' . 'UNION DISTINCT (SELECT :page, content_uid FROM idx_content_content WHERE subcontent_uid = :content)' ; $ params = array ( 'page' => $ page -> getUid ( ) , 'content' => $ content -> getUid ( ) , ) ; return $ this -> removeIdxContentPage ( $ content , $ page ) -> executeUpdate ( $ query , $ params ) -> replaceIdxSite ( $ page ) ; }
Replace page-content indexes for the provided page
Then replace site_content indexes.

@param  Page                 $page
@param  AbstractClassContent $content

@return IndexationRepository
Replace page - content indexes for the provided page Then replace site_content indexes .