You are here

public function ServiceContainerServiceProvider::getContainerDefinition in Service Container 7

Same name in this branch
  1. 7 src/ServiceContainer/ServiceProvider/ServiceContainerServiceProvider.php \Drupal\service_container\ServiceContainer\ServiceProvider\ServiceContainerServiceProvider::getContainerDefinition()
  2. 7 tests/modules/service_container_test_ctools/src/ServiceContainer/ServiceProvider/ServiceContainerServiceProvider.php \Drupal\service_container_test_ctools\ServiceContainer\ServiceProvider\ServiceContainerServiceProvider::getContainerDefinition()
  3. 7 tests/modules/service_container_test/src/ServiceContainer/ServiceProvider/ServiceContainerServiceProvider.php \Drupal\service_container_test\ServiceContainer\ServiceProvider\ServiceContainerServiceProvider::getContainerDefinition()
Same name and namespace in other branches
  1. 7.2 tests/modules/service_container_test/src/ServiceContainer/ServiceProvider/ServiceContainerServiceProvider.php \Drupal\service_container_test\ServiceContainer\ServiceProvider\ServiceContainerServiceProvider::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 ServiceProviderInterface::getContainerDefinition

File

tests/modules/service_container_test/src/ServiceContainer/ServiceProvider/ServiceContainerServiceProvider.php, line 22
Contains \Drupal\service_container_test\ServiceContainer\ServiceProvider\ServiceContainerServiceProvider.

Class

ServiceContainerServiceProvider
Overrides some specific services/parameters for tests purposes.

Namespace

Drupal\service_container_test\ServiceContainer\ServiceProvider

Code

public function getContainerDefinition() {
  return variable_get('service_container_test_definition', array());
}