Spaces:
No application file
No application file
mautic
/
app
/bundles
/IntegrationsBundle
/DependencyInjection
/Compiler
/BuilderIntegrationPass.php
| declare(strict_types=1); | |
| namespace Mautic\IntegrationsBundle\DependencyInjection\Compiler; | |
| use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | |
| use Symfony\Component\DependencyInjection\ContainerBuilder; | |
| use Symfony\Component\DependencyInjection\Reference; | |
| class BuilderIntegrationPass implements CompilerPassInterface | |
| { | |
| public function process(ContainerBuilder $container): void | |
| { | |
| $taggedServices = $container->findTaggedServiceIds('mautic.builder_integration'); | |
| $integrationsHelper = $container->findDefinition('mautic.integrations.helper.builder_integrations'); | |
| foreach ($taggedServices as $id => $tags) { | |
| $integrationsHelper->addMethodCall('addIntegration', [new Reference($id)]); | |
| } | |
| } | |
| } | |