addTaggedServices example

/** * @return void */
    public function process(ContainerBuilder $container)
    {
        if (!$container->hasParameter($this->connectionsParameter)) {
            return;
        }

        $this->connections = $container->getParameter($this->connectionsParameter);
        $listenerRefs = $this->addTaggedServices($container);

        // replace service container argument of event managers with smaller service locator         // so services can even remain private         foreach ($listenerRefs as $connection => $refs) {
            $this->getEventManagerDef($container$connection)
                ->replaceArgument(0, ServiceLocatorTagPass::register($container$refs));
        }
    }

    private function addTaggedServices(ContainerBuilder $container): array
    {
        
Home | Imprint | This part of the site doesn't use cookies.