collection_service = $collection_service; $this->service_tag = $service_tag; } /** * Modify the container before it is passed to the rest of the code * * @param ContainerBuilder $container ContainerBuilder object * @return null */ public function process(ContainerBuilder $container) { $definition = $container->getDefinition($this->collection_service); foreach ($container->findTaggedServiceIds($this->service_tag) as $id => $data) { $definition->addMethodCall('add', array($id)); } } }