public function initializeBySiteAndIndexConfigurations(Site $site, array $indexingConfigurationNames): array
    {
        $initializationStatus = [];

        $hasWildcardConfiguration = in_array('*', $indexingConfigurationNames);
        $indexingConfigurationNames = $hasWildcardConfiguration ? $site->getSolrConfiguration()->getEnabledIndexQueueConfigurationNames() : $indexingConfigurationNames;
        foreach ($indexingConfigurationNames as $indexingConfigurationName) {
            $initializationStatus[$indexingConfigurationName] = $this->applyInitialization($site, (string)$indexingConfigurationName);
        }

        if (!is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['postProcessIndexQueueInitialization'])) {
            return $initializationStatus;
        }

        foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['postProcessIndexQueueInitialization'] as $classReference) {
            $indexQueueInitializationPostProcessor = GeneralUtility::makeInstance($classReference);
            if ($indexQueueInitializationPostProcessor instanceof InitializationPostProcessor) {
                $indexQueueInitializationPostProcessor->postProcessIndexQueueInitialization($site, $indexingConfigurationNames, $initializationStatus);
            } else {
                throw new \UnexpectedValueException(get_class($indexQueueInitializationPostProcessor) . ' must implement interface ' . InitializationPostProcessor::class, 1345815561);
            }
        }

        return $initializationStatus;
    }
public function initializeBySiteAndIndexConfigurations(Site $site, array $indexingConfigurationNames): array
    {
        $initializationStatus = [];

        $hasWildcardConfiguration = in_array('*', $indexingConfigurationNames);
        $indexingConfigurationNames = $hasWildcardConfiguration ? $site->getSolrConfiguration()->getEnabledIndexQueueConfigurationNames() : $indexingConfigurationNames;
        foreach ($indexingConfigurationNames as $indexingConfigurationName) {
            $initializationStatus[$indexingConfigurationName] = $this->applyInitialization($site, (string)$indexingConfigurationName);
        }

        if (!is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['postProcessIndexQueueInitialization'])) {
            return $initializationStatus;
        }

        foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['postProcessIndexQueueInitialization'] as $classReference) {
            $indexQueueInitializationPostProcessor = GeneralUtility::makeInstance($classReference);
            if ($indexQueueInitializationPostProcessor instanceof InitializationPostProcessor) {
                $indexQueueInitializationPostProcessor->postProcessIndexQueueInitialization($site, $indexingConfigurationNames, $initializationStatus);
            } else {
                throw new \UnexpectedValueException(get_class($indexQueueInitializationPostProcessor) . ' must implement interface ' . InitializationPostProcessor::class, 1345815561);
            }
        }

        return $initializationStatus;
    }
public function initializeBySiteAndIndexConfigurations ( Site $ site , array $ indexingConfigurationNames ) : array { $ initializationStatus = [ ] ; $ hasWildcardConfiguration = in_array ( '*' , $ indexingConfigurationNames ) ; $ indexingConfigurationNames = $ hasWildcardConfiguration ? $ site -> getSolrConfiguration ( ) -> getEnabledIndexQueueConfigurationNames ( ) : $ indexingConfigurationNames ; foreach ( $ indexingConfigurationNames as $ indexingConfigurationName ) { $ initializationStatus [ $ indexingConfigurationName ] = $ this -> applyInitialization ( $ site , ( string ) $ indexingConfigurationName ) ; } if ( ! is_array ( $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'EXTCONF' ] [ 'solr' ] [ 'postProcessIndexQueueInitialization' ] ) ) { return $ initializationStatus ; } foreach ( $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'EXTCONF' ] [ 'solr' ] [ 'postProcessIndexQueueInitialization' ] as $ classReference ) { $ indexQueueInitializationPostProcessor = GeneralUtility :: makeInstance ( $ classReference ) ; if ( $ indexQueueInitializationPostProcessor instanceof InitializationPostProcessor ) { $ indexQueueInitializationPostProcessor -> postProcessIndexQueueInitialization ( $ site , $ indexingConfigurationNames , $ initializationStatus ) ; } else { throw new \ UnexpectedValueException ( get_class ( $ indexQueueInitializationPostProcessor ) . ' must implement interface ' . InitializationPostProcessor :: class , 1345815561 ) ; } } return $ initializationStatus ; }
Initializes a set index configurations for a given site.

@param Site $site
@param array $indexingConfigurationNames if one of the names is a * (wildcard) all configurations are used,
@return array
Initializes a set index configurations for a given site .