protected function getSolrConnectionsByItem(Item $item)
    {
        $solrConnections = [];

        $pageId = $item->getRootPageUid();
        if ($item->getType() === 'pages') {
            $pageId = $item->getRecordUid();
        }

        // Solr configurations possible for this item
        $site = $item->getSite();

        $solrConfigurationsBySite = $this->connectionManager->getConfigurationsBySite($site);
        $siteLanguages = [];
        foreach ($solrConfigurationsBySite as $solrConfiguration) {
            $siteLanguages[] = $solrConfiguration['language'];
        }

        $defaultLanguageUid = $this->getDefaultLanguageUid($item, $site->getRootPage(), $siteLanguages);
        $translationOverlays = $this->getTranslationOverlaysWithConfiguredSite($pageId, $site, $defaultLanguageUid, $siteLanguages);

        $defaultConnection = $this->connectionManager->getConnectionByPageId($pageId, 0, $item->getMountPointIdentifier());
        $translationConnections = $this->getConnectionsForIndexableLanguages($translationOverlays);

        if ($defaultLanguageUid == 0) {
            $solrConnections[0] = $defaultConnection;
        }

        foreach ($translationConnections as $systemLanguageUid => $solrConnection) {
            $solrConnections[$systemLanguageUid] = $solrConnection;
        }
        return $solrConnections;
    }
protected function getSolrConnectionsByItem(Item $item)
    {
        $solrConnections = [];

        $pageId = $item->getRootPageUid();
        if ($item->getType() === 'pages') {
            $pageId = $item->getRecordUid();
        }

        // Solr configurations possible for this item
        $site = $item->getSite();

        $solrConfigurationsBySite = $this->connectionManager->getConfigurationsBySite($site);
        $siteLanguages = [];
        foreach ($solrConfigurationsBySite as $solrConfiguration) {
            $siteLanguages[] = $solrConfiguration['language'];
        }

        $defaultLanguageUid = $this->getDefaultLanguageUid($item, $site->getRootPage(), $siteLanguages);
        $translationOverlays = $this->getTranslationOverlaysWithConfiguredSite($pageId, $site, $defaultLanguageUid, $siteLanguages);

        $defaultConnection = $this->connectionManager->getConnectionByPageId($pageId, 0, $item->getMountPointIdentifier());
        $translationConnections = $this->getConnectionsForIndexableLanguages($translationOverlays);

        if ($defaultLanguageUid == 0) {
            $solrConnections[0] = $defaultConnection;
        }

        foreach ($translationConnections as $systemLanguageUid => $solrConnection) {
            $solrConnections[$systemLanguageUid] = $solrConnection;
        }
        return $solrConnections;
    }
protected function getSolrConnectionsByItem ( Item $ item ) { $ solrConnections = [ ] ; $ pageId = $ item -> getRootPageUid ( ) ; if ( $ item -> getType ( ) === 'pages' ) { $ pageId = $ item -> getRecordUid ( ) ; } // Solr configurations possible for this item $ site = $ item -> getSite ( ) ; $ solrConfigurationsBySite = $ this -> connectionManager -> getConfigurationsBySite ( $ site ) ; $ siteLanguages = [ ] ; foreach ( $ solrConfigurationsBySite as $ solrConfiguration ) { $ siteLanguages [ ] = $ solrConfiguration [ 'language' ] ; } $ defaultLanguageUid = $ this -> getDefaultLanguageUid ( $ item , $ site -> getRootPage ( ) , $ siteLanguages ) ; $ translationOverlays = $ this -> getTranslationOverlaysWithConfiguredSite ( $ pageId , $ site , $ defaultLanguageUid , $ siteLanguages ) ; $ defaultConnection = $ this -> connectionManager -> getConnectionByPageId ( $ pageId , 0 , $ item -> getMountPointIdentifier ( ) ) ; $ translationConnections = $ this -> getConnectionsForIndexableLanguages ( $ translationOverlays ) ; if ( $ defaultLanguageUid == 0 ) { $ solrConnections [ 0 ] = $ defaultConnection ; } foreach ( $ translationConnections as $ systemLanguageUid => $ solrConnection ) { $ solrConnections [ $ systemLanguageUid ] = $ solrConnection ; } return $ solrConnections ; }
Gets the Solr connections applicable for an item.

The connections include the default connection and connections to be used
for translations of an item.

@param Item $item An index queue item
@return array An array of ApacheSolrForTypo3\Solr\System\Solr\SolrConnection connections, the array's keys are the sys_language_uid of the language of the connection
Gets the Solr connections applicable for an item .