Append the aggregation providers to search requests configuration.

@return BaseConfig
763489
private function addAggregationProviders()
    {
        foreach ($this->_data as $requestName => $requestConfig) {
            if (isset($requestConfig['aggregationsProviders'])) {
                $providers = [];

                foreach ($requestConfig['aggregationsProviders'] as $providerName => $providerClass) {
                    $providers[$providerName] = $this->objectManager->create($providerClass, ['requestName' => $requestName]);
                }

                $this->_data[$requestName]['aggregationsProviders'] = $providers;
            }
        }
    }
178369
protected function setHttpOptions(): self
    {
        if ($this->config->has('http') && is_array($this->config->get('http'))) {
            $this->config->forget('http.base_uri');
            $this->httpOptions = $this->config->get('http');
        }

        return $this;
    }
1165496
public static function factory($config = array())
    {
        $required = array(
            'base_url',
            'username',
            'password',
        );

        $defaults = array(
            'base_url' => self::BASE_URL,
            'base_path' => self::BASE_PATH,
        );

        // Instantiate the Acquia Search plugin.
        $config = Collection::fromConfig($config, $defaults, $required);
        $client = new static($config->get('base_url'), $config);
        $client->setDefaultHeaders(array(
            'Content-Type' => 'application/json; charset=utf-8',
        ));

        // Attach the Acquia Search plugin to the client.
        $plugin = new CloudApiAuthPlugin($config->get('username'), $config->get('password'));
        $client->addSubscriber($plugin);

        return $client;
    }
706324
protected function linkAggregates()
	{
		// Init
		$configuredAggregates = [];

		// Look for configured entity services to tag.
		if(Config::get('sorad.entity.aggregates'))
		{
			$configuredAggregates = array_keys(Config::get('sorad.entity.aggregates'));
		}

		// Combine all of our configured aggregates.
		$aggregates = array_merge($this->aggregates, $configuredAggregates, $this->core['aggregates']);

		// Iterate configured aggregates and tag.
		foreach($aggregates as $aggregate)
		{
			$this->app->tag([$aggregate], $this->getProviderKey());
		}
	}
1050972
protected function getBaseQuery()
    {
        $config = $this->getConfig();
        $connector = $this->getConnector();
        /** @var \Gerrie\Component\Connection\SSH $connector  */

        $connector->reset();

        $host = $config['host'];
        if (isset($config['user']) === true) {
            $host = $config['user'] . '@' . $host;
        }
        $connector->addCommandPart($host);
        $connector->addCommandPart('gerrit');

        return $connector;
    }
1284376
protected function addStandardAssignments()
    {
        $this->searchProvider->setConfigurationValue('extendedSearch', $this->searchProvider->isExtendedSearch());
        $this->searchProvider->setConfigurationValue(
            'uid',
            $this->configurationManager->getContentObject()->data['uid']
        );
        $this->searchProvider->setConfigurationValue('prefixID', 'tx_find_find');
        $this->searchProvider->setConfigurationValue('pageTitle', $GLOBALS['TSFE']->page['title']);
    }
731911
public function config()
    {
        $this->setContentHeader('application/javascript');

        //get extension paths to set up aliases dynamically
        $extensionsAliases = ClientLibRegistry::getRegistry()->getLibAliasMap();
        $this->setData('extensionsAliases', $extensionsAliases);

        $libConfigs = ClientLibConfigRegistry::getRegistry()->getMap();
        // Dynamically adds the date format.
        $formatter = DateHelper::getDateFormatter();
        $libConfigs['util/locale']['dateTimeFormat'] = $formatter->getJavascriptFormat(DateHelper::FORMAT_LONG);
        $this->setData('libConfigs', $libConfigs);

        $extendedConfig = $this->getServiceLocator()->get(ClientConfigService::SERVICE_ID)->getExtendedConfig();
        foreach ($extendedConfig as $key => $value) {
            $this->setData($key, json_encode($value));
        }

        //use the resolver in order to validate the route
        $resolver = $this->getResolver();

        //loads the URLs context
        /** @var AssetService $assetService */
        $assetService = $this->getServiceLocator()->get(AssetService::SERVICE_ID);
        $tao_base_www = $assetService->getJsBaseWww('tao');
        $this->setData('buster', $assetService->getCacheBuster());

        $base_www = $assetService->getJsBaseWww($resolver->getExtensionId());
        $base_url = $this->getExtension($resolver->getExtensionId())->getConstant('BASE_URL');

        $langCode = tao_helpers_I18n::getLangCode();
        if(strpos($langCode, '-') > 0){
            $lang = strtolower(substr($langCode, 0, strpos($langCode, '-')));
        } else {
            $lang = strtolower($langCode);
        }

        $this->setData('locale', $langCode);
        $this->setData('client_timeout', $this->getClientTimeout());
        $this->setData('crossorigin', $this->isCrossorigin());
        $this->setData('tao_base_www', $tao_base_www);

        $this->setData('context', json_encode([
            'root_url'       => ROOT_URL,
            'base_url'       => $base_url,
            'taobase_www'    => $tao_base_www,
            'base_www'       => $base_www,
            'base_lang'      => $lang,
            'locale'         => $langCode,
            'timeout'        => $this->getClientTimeout(),
            'extension'      => $resolver->getExtensionId(),
            'module'         => $resolver->getControllerShortName(),
            'action'         => $resolver->getMethodName(),
            'shownExtension' => $this->getShownExtension(),
            'shownStructure' => $this->getShownStructure(),
            'bundle'         => tao_helpers_Mode::is(tao_helpers_Mode::PRODUCTION)
        ]));

        $this->setView('client_config.tpl');
    }
275503
protected function addConfigParameterNode()
    {
    	$builder = new TreeBuilder();
    	$node = $builder->root('config');
    
    	$node
    		->treatTrueLike(array('form' => array(
    			'type' => "ASF\WebsiteBundle\Form\Type\ConfigType",
    			'name' => 'website_config_type'
    		)))
    		->treatFalseLike(array('form' => array(
    			'type' => "ASF\WebsiteBundle\Form\Type\ConfigType",
    			'name' => 'website_config_type'
    		)))
    		->addDefaultsIfNotSet()
    		->children()
    			->arrayNode('form')
    				->addDefaultsIfNotSet()
    				->children()
    					->scalarNode('type')
    						->defaultValue('ASF\WebsiteBundle\Form\Type\ConfigType')
    					->end()
    					->scalarNode('name')
    						->defaultValue('website_config_type')
    					->end()
    					->arrayNode('validation_groups')
    						->prototype('scalar')->end()
    						->defaultValue(array("Default"))
    					->end()
    				->end()
    			->end()
    		->end()
    	;
    
    	return $node;
    }
983023
private function addFilters()
    {
        foreach ($this->_data as $requestName => $requestConfig) {
            if (isset($requestConfig['filters'])) {
                $filters = [];

                foreach ($requestConfig['filters'] as $filterName => $filterClass) {
                    $filters[$filterName] = $this->objectManager->get($filterClass);
                }

                $this->_data[$requestName]['filters'] = $filters;
            }
        }
    }
729105
private function addMappings()
    {
        $indicesSettings = $this->indexSettings->getIndicesConfig();

        foreach ($this->_data as $requestName => $requestConfig) {
            $index = $requestConfig['index'];
            $this->_data[$requestName]['mapping'] = $indicesSettings[$index]['mapping'];
        }

        return $this;
    }
1177120
public function addAggregate($agg) {
        $aggregate = new Aggregate($agg);
        if ($this->searchParams->aggregates == null) {
            $this->searchParams->aggregates = array();
        }
        $this->searchParams->aggregates[] = $aggregate;
    }
388193
public function getConfig()
    {
        $config = [];
        $provider = new ConfigProvider();

        $config['middleware_pipeline']    = $provider->getMiddlewareConfig();
        $config['service_manager']        = $provider->getDependencyConfig();

        return $config;
    }
1243700
public static function defaultProvider()
    {
        $data = \ILAB_Aws\load_compiled_json(__DIR__ . '/../data/endpoints.json');
        $prefixData = \ILAB_Aws\load_compiled_json(__DIR__ . '/../data/endpoints_prefix_history.json');
        $mergedData = self::mergePrefixData($data, $prefixData);

        return new self($mergedData['partitions']);
    }
479682
public function addBaseParams()
    {
        $request = $this->getPayPalRequest();
        $payPalConfig = $this->getPayPalConfig();

        $request->setParameter("CALLBACKVERSION", "84.0");
        $request->setParameter("LOCALECODE", $this->getLang()->translateString("OEPAYPAL_LOCALE"));
        // enabled guest buy (Buyer does not need to create a PayPal account to check out)
        $request->setParameter("SOLUTIONTYPE", ($payPalConfig->isGuestBuyEnabled() ? "Sole" : "Mark"));
        $request->setParameter("BRANDNAME", $payPalConfig->getBrandName());
        $request->setParameter("CARTBORDERCOLOR", $payPalConfig->getBorderColor());

        $request->setParameter("RETURNURL", $this->getReturnUrl());
        $request->setParameter("CANCELURL", $this->getCancelUrl());

        if ($logoImage = $payPalConfig->getLogoUrl()) {
            $request->setParameter("LOGOIMG", $logoImage);
        }

        $request->setParameter("PAYMENTREQUEST_0_PAYMENTACTION", $this->getTransactionMode());
    }
819677
public function getConfig()
    {
        $config = [];
        foreach ($this->providers as $key => $provider) {
            $config[$key] = $provider->getConfig();
        }

        return $config;
    }
1339578
public function getConfig()
    {
        if ($this->config) {
            return $this->config;
        }

        $config = $this->getDefaultConfig();

        // read from database
        $result = $this->connection->fetchAll('SELECT type, class FROM fusio_provider ORDER BY class ASC');
        foreach ($result as $row) {
            $this->mergeClass($config, $row['type'], $row['class']);
        }

        // read from file
        if (!empty($this->file)) {
            $result = include($this->file);

            if (is_array($result)) {
                foreach ($result as $type => $classes) {
                    foreach ($classes as $class) {
                        $this->mergeClass($config, $type, $class);
                    }
                }
            }
        }

        return $this->config = new ProviderConfig($config);
    }
364440
public function addConfig()
    {
        $params = func_get_args();

        if (!empty($params)) {
            if (is_array($params[0])) {
                forward_static_call_array([Configuration::class, 'setMany'], $params);
            } else {
                forward_static_call_array([Configuration::class, 'set'], $params);
            }
        }

        return $this;
    }