src/Starkerxp/CampaignBundle/Api/ApiPass.php 1 location
|
@@ 9-22 (lines=14) @@
|
| 6 |
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 7 |
|
use Symfony\Component\DependencyInjection\Reference; |
| 8 |
|
|
| 9 |
|
class ApiPass implements CompilerPassInterface |
| 10 |
|
{ |
| 11 |
|
public function process(ContainerBuilder $container) |
| 12 |
|
{ |
| 13 |
|
$definitionId = 'starkerxp_campaign.api.manager'; |
| 14 |
|
if (!($container->has($definitionId))) { |
| 15 |
|
return false; |
| 16 |
|
} |
| 17 |
|
$definition = $container->findDefinition($definitionId); |
| 18 |
|
foreach (array_keys($container->findTaggedServiceIds('starkerxp_campaign.api')) as $id) { |
| 19 |
|
$definition->addMethodCall('addApiService', [new Reference($id)]); |
| 20 |
|
} |
| 21 |
|
} |
| 22 |
|
} |
| 23 |
|
|
src/Starkerxp/CampaignBundle/Render/RenderPass.php 1 location
|
@@ 15-28 (lines=14) @@
|
| 12 |
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 13 |
|
use Symfony\Component\DependencyInjection\Reference; |
| 14 |
|
|
| 15 |
|
class RenderPass implements CompilerPassInterface |
| 16 |
|
{ |
| 17 |
|
public function process(ContainerBuilder $container) |
| 18 |
|
{ |
| 19 |
|
$definitionId = 'starkerxp_campaign.manager.render'; |
| 20 |
|
if (!($container->has($definitionId))) { |
| 21 |
|
return false; |
| 22 |
|
} |
| 23 |
|
$definition = $container->findDefinition($definitionId); |
| 24 |
|
foreach (array_keys($container->findTaggedServiceIds('starkerxp_campaign.render')) as $id) { |
| 25 |
|
$definition->addMethodCall('addRenderService', [new Reference($id)]); |
| 26 |
|
} |
| 27 |
|
} |
| 28 |
|
} |
| 29 |
|
|
src/Starkerxp/StructureBundle/Manager/ManagerPass.php 1 location
|
@@ 15-30 (lines=16) @@
|
| 12 |
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 13 |
|
use Symfony\Component\DependencyInjection\Reference; |
| 14 |
|
|
| 15 |
|
class ManagerPass implements CompilerPassInterface |
| 16 |
|
{ |
| 17 |
|
public function process(ContainerBuilder $container) |
| 18 |
|
{ |
| 19 |
|
$definitionId = 'starkerxp_structure.manager.entity'; |
| 20 |
|
if (!($container->has($definitionId))) { |
| 21 |
|
return false; |
| 22 |
|
} |
| 23 |
|
$definition = $container->findDefinition($definitionId); |
| 24 |
|
foreach (array_keys($container->findTaggedServiceIds('starkerxp.manager.entity')) as $id) { |
| 25 |
|
$definition->addMethodCall('addService', [new Reference($id)]); |
| 26 |
|
} |
| 27 |
|
|
| 28 |
|
return true; |
| 29 |
|
} |
| 30 |
|
} |
| 31 |
|
|