public function getConfigurationByPageId($pageId, $language = 0, $mount = '')
    {
        // find the root page
        $pageSelect = GeneralUtility::makeInstance(PageRepository::class);

        /** @var Rootline $rootLine */
        $rootLine = GeneralUtility::makeInstance(Rootline::class, /** @scrutinizer ignore-type */ $pageSelect->getRootLine($pageId, $mount));
        $siteRootPageId = $rootLine->getRootPageId();

        try {
            $solrConfiguration = $this->getConfigurationByRootPageId($siteRootPageId, $language);
        } catch (NoSolrConnectionFoundException $nscfe) {
            /* @var $noSolrConnectionException NoSolrConnectionFoundException */
            $noSolrConnectionException = GeneralUtility::makeInstance(
                NoSolrConnectionFoundException::class,
                /** @scrutinizer ignore-type */ $nscfe->getMessage() . ' Initial page used was [' . $pageId . ']',
                /** @scrutinizer ignore-type */ 1275399922
            );
            $noSolrConnectionException->setPageId($pageId);

            throw $noSolrConnectionException;
        }

        return $solrConfiguration;
    }
public function getConfigurationByPageId($pageId, $language = 0, $mount = '')
    {
        // find the root page
        $pageSelect = GeneralUtility::makeInstance(PageRepository::class);

        /** @var Rootline $rootLine */
        $rootLine = GeneralUtility::makeInstance(Rootline::class, /** @scrutinizer ignore-type */ $pageSelect->getRootLine($pageId, $mount));
        $siteRootPageId = $rootLine->getRootPageId();

        try {
            $solrConfiguration = $this->getConfigurationByRootPageId($siteRootPageId, $language);
        } catch (NoSolrConnectionFoundException $nscfe) {
            /* @var $noSolrConnectionException NoSolrConnectionFoundException */
            $noSolrConnectionException = GeneralUtility::makeInstance(
                NoSolrConnectionFoundException::class,
                /** @scrutinizer ignore-type */ $nscfe->getMessage() . ' Initial page used was [' . $pageId . ']',
                /** @scrutinizer ignore-type */ 1275399922
            );
            $noSolrConnectionException->setPageId($pageId);

            throw $noSolrConnectionException;
        }

        return $solrConfiguration;
    }
public function getConfigurationByPageId ( $ pageId , $ language = 0 , $ mount = '' ) { // find the root page $ pageSelect = GeneralUtility :: makeInstance ( PageRepository :: class ) ; /** @var Rootline $rootLine */ $ rootLine = GeneralUtility :: makeInstance ( Rootline :: class , /** @scrutinizer ignore-type */ $ pageSelect -> getRootLine ( $ pageId , $ mount ) ) ; $ siteRootPageId = $ rootLine -> getRootPageId ( ) ; try { $ solrConfiguration = $ this -> getConfigurationByRootPageId ( $ siteRootPageId , $ language ) ; } catch ( NoSolrConnectionFoundException $ nscfe ) { /* @var $noSolrConnectionException NoSolrConnectionFoundException */ $ noSolrConnectionException = GeneralUtility :: makeInstance ( NoSolrConnectionFoundException :: class , /** @scrutinizer ignore-type */ $ nscfe -> getMessage ( ) . ' Initial page used was [' . $ pageId . ']' , /** @scrutinizer ignore-type */ 1275399922 ) ; $ noSolrConnectionException -> setPageId ( $ pageId ) ; throw $ noSolrConnectionException ; } return $ solrConfiguration ; }
Gets a Solr configuration for a page ID.

@param int $pageId A page ID.
@param int $language The language ID to get the connection for as the path may differ. Optional, defaults to 0.
@param string $mount Comma list of MountPoint parameters
@return array A solr configuration.
@throws NoSolrConnectionFoundException
Gets a Solr configuration for a page ID .