protected function HttpServiceApiHandler::overrideServiceApiDefinition in HTTP Client Manager 8
Same name and namespace in other branches
- 8.2 src/HttpServiceApiHandler.php \Drupal\http_client_manager\HttpServiceApiHandler::overrideServiceApiDefinition()
Override Service API definition.
Checks for overriding configurations in settings.php for the given Service API Definition.
Parameters
string $id: The service api id.
array $serviceApi: An array of service api definition.
1 call to HttpServiceApiHandler::overrideServiceApiDefinition()
- HttpServiceApiHandler::buildServicesApiYaml in src/
HttpServiceApiHandler.php - Builds all services api provided by .http_services_api.yml files.
File
- src/
HttpServiceApiHandler.php, line 186
Class
- HttpServiceApiHandler
- Class HttpServiceApiHandler.
Namespace
Drupal\http_client_managerCode
protected function overrideServiceApiDefinition($id, array &$serviceApi) {
$settings = Settings::get('http_services_api', []);
if (empty($settings[$id]) || !$this->config
->get('enable_overriding_service_definitions')) {
return;
}
$overrides = array_flip(self::getOverridableProperties());
$settings[$id] = array_intersect_key($settings[$id], $overrides);
$serviceApi = array_merge($serviceApi, $settings[$id]);
}