You are here

public function ServiceContainerAnnotationDiscoveryServiceProvider::getContainerDefinition in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_annotation_discovery/src/ServiceContainer/ServiceProvider/ServiceContainerAnnotationDiscoveryServiceProvider.php \Drupal\service_container_annotation_discovery\ServiceContainer\ServiceProvider\ServiceContainerAnnotationDiscoveryServiceProvider::getContainerDefinition()

Gets a service container definition.

Return value

array Returns an associative array with the following keys:

  • parameters: Simple key-value store of container parameters
  • services: Services like defined in services.yml

factory methods, arguments and tags are supported for services.

@see core.services.yml in Drupal 8

Overrides ServiceContainerServiceProvider::getContainerDefinition

File

modules/providers/service_container_annotation_discovery/src/ServiceContainer/ServiceProvider/ServiceContainerAnnotationDiscoveryServiceProvider.php, line 23
Contains \Drupal\service_container_annotation_discovery\ServiceContainer\ServiceProvider\ServiceContainerAnnotationDiscoveryServiceProvider

Class

ServiceContainerAnnotationDiscoveryServiceProvider
Provides render cache service definitions.

Namespace

Drupal\service_container_annotation_discovery\ServiceContainer\ServiceProvider

Code

public function getContainerDefinition() {
  $services = array();
  $parameters['service_container.plugin_managers'] = array();
  $parameters['service_container.plugin_manager_types'] = array(
    'annotated' => '\\Drupal\\service_container_annotation_discovery\\Plugin\\Discovery\\AnnotatedClassDiscovery',
  );
  return array(
    'parameters' => $parameters,
    'services' => $services,
  );
}