protected function collectConnectionInfos()
    {
        $connectedHosts = [];
        $missingHosts = [];
        $invalidPaths = [];

        /* @var Path $path */
        $path = GeneralUtility::makeInstance(Path::class);
        $connections = $this->solrConnectionManager->getConnectionsBySite($this->selectedSite);

        if (empty($connections)) {
            $this->view->assign('can_not_proceed', true);
            return;
        }

        foreach ($connections as $connection) {
            $coreAdmin = $connection->getAdminService();
            $coreUrl = (string)$coreAdmin;

            if ($coreAdmin->ping()) {
                $connectedHosts[] = $coreUrl;
            } else {
                $missingHosts[] = $coreUrl;
            }

            if (!$path->isValidSolrPath($coreAdmin->getCorePath())) {
                $invalidPaths[] = $coreAdmin->getCorePath();
            }
        }

        $this->view->assignMultiple([
            'site' => $this->selectedSite,
            'apiKey' => Api::getApiKey(),
            'connectedHosts' => $connectedHosts,
            'missingHosts' => $missingHosts,
            'invalidPaths' => $invalidPaths
        ]);
    }
protected function collectConnectionInfos()
    {
        $connectedHosts = [];
        $missingHosts = [];
        $invalidPaths = [];

        /* @var Path $path */
        $path = GeneralUtility::makeInstance(Path::class);
        $connections = $this->solrConnectionManager->getConnectionsBySite($this->selectedSite);

        if (empty($connections)) {
            $this->view->assign('can_not_proceed', true);
            return;
        }

        foreach ($connections as $connection) {
            $coreAdmin = $connection->getAdminService();
            $coreUrl = (string)$coreAdmin;

            if ($coreAdmin->ping()) {
                $connectedHosts[] = $coreUrl;
            } else {
                $missingHosts[] = $coreUrl;
            }

            if (!$path->isValidSolrPath($coreAdmin->getCorePath())) {
                $invalidPaths[] = $coreAdmin->getCorePath();
            }
        }

        $this->view->assignMultiple([
            'site' => $this->selectedSite,
            'apiKey' => Api::getApiKey(),
            'connectedHosts' => $connectedHosts,
            'missingHosts' => $missingHosts,
            'invalidPaths' => $invalidPaths
        ]);
    }
protected function collectConnectionInfos ( ) { $ connectedHosts = [ ] ; $ missingHosts = [ ] ; $ invalidPaths = [ ] ; /* @var Path $path */ $ path = GeneralUtility :: makeInstance ( Path :: class ) ; $ connections = $ this -> solrConnectionManager -> getConnectionsBySite ( $ this -> selectedSite ) ; if ( empty ( $ connections ) ) { $ this -> view -> assign ( 'can_not_proceed' , true ) ; return ; } foreach ( $ connections as $ connection ) { $ coreAdmin = $ connection -> getAdminService ( ) ; $ coreUrl = ( string ) $ coreAdmin ; if ( $ coreAdmin -> ping ( ) ) { $ connectedHosts [ ] = $ coreUrl ; } else { $ missingHosts [ ] = $ coreUrl ; } if ( ! $ path -> isValidSolrPath ( $ coreAdmin -> getCorePath ( ) ) ) { $ invalidPaths [ ] = $ coreAdmin -> getCorePath ( ) ; } } $ this -> view -> assignMultiple ( [ 'site' => $ this -> selectedSite , 'apiKey' => Api :: getApiKey ( ) , 'connectedHosts' => $ connectedHosts , 'missingHosts' => $ missingHosts , 'invalidPaths' => $ invalidPaths ] ) ; }
Checks whether the configured Solr server can be reached and provides a
flash message according to the result of the check.

@return void
Checks whether the configured Solr server can be reached and provides a flash message according to the result of the check .