@@ 22-38 (lines=17) @@ | ||
19 | * Register the entity code generator services |
|
20 | * (services tagged with "blast.entity_code_generator"). |
|
21 | */ |
|
22 | class CodeGeneratorCompilerPass implements CompilerPassInterface |
|
23 | { |
|
24 | public function process(ContainerBuilder $container) |
|
25 | { |
|
26 | if (!$container->has('blast_core.code_generators')) { |
|
27 | return; |
|
28 | } |
|
29 | ||
30 | $registry = $container->findDefinition('blast_core.code_generators'); |
|
31 | ||
32 | $taggedServices = $container->findTaggedServiceIds('blast.entity_code_generator'); |
|
33 | ||
34 | foreach ($taggedServices as $id => $tags) { |
|
35 | $registry->addMethodCall('register', [new Reference($id)]); |
|
36 | } |
|
37 | } |
|
38 | } |
|
39 |
@@ 18-34 (lines=17) @@ | ||
15 | use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; |
|
16 | use Symfony\Component\DependencyInjection\Reference; |
|
17 | ||
18 | class DashboardBlocksCompilerPass implements CompilerPassInterface |
|
19 | { |
|
20 | public function process(ContainerBuilder $container) |
|
21 | { |
|
22 | if (!$container->has('blast_core.dashboard.registry')) { |
|
23 | return; |
|
24 | } |
|
25 | ||
26 | $registry = $container->findDefinition('blast_core.dashboard.registry'); |
|
27 | ||
28 | $taggedServices = $container->findTaggedServiceIds('blast.dashboard_block'); |
|
29 | ||
30 | foreach ($taggedServices as $id => $tags) { |
|
31 | $registry->addMethodCall('registerBlock', [new Reference($id)]); |
|
32 | } |
|
33 | } |
|
34 | } |
|
35 |