You are here

function hook_render_cache_container_build_alter in Render cache 7.2

Allows to alter the container definition.

Parameters

array $container_definition: An associative array with the following keys:

  • parameters: Simple key-value store of container parameters.
  • services: Services like defined in services.yml
  • tags: Associative array keyed by tag names with array('service_name' => $tag_args) as values.

See also

ServiceProviderInterface::getContainerDefinition()

ServiceProviderInterface::alterContainerDefinition()

File

./render_cache.api.php, line 57

Code

function hook_render_cache_container_build_alter(&$container_definition) {
  $tagged_services = array();
  foreach ($container_definition['tags']['some-tag'] as $service => $tags) {
    $tagged_services[] = $service;
  }
  $container_definition['parameters']['some_service_tagged_services'] = implode(',', $tagged_services);
}