| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | 2 | public function process(ContainerBuilder $builder) |
|
| 16 | { |
||
| 17 | 2 | if (!$builder->hasDefinition(LAGAdminBundle::SERVICE_ID_ACTION_REGISTRY)) { |
|
| 18 | 1 | return; |
|
| 19 | } |
||
| 20 | 1 | $actionRegistry = $builder->getDefinition(LAGAdminBundle::SERVICE_ID_ACTION_REGISTRY); |
|
| 21 | 1 | $actions = $builder->findTaggedServiceIds(LAGAdminBundle::SERVICE_TAG_ACTION); |
|
| 22 | |||
| 23 | //var_dump($actions); |
||
| 24 | |||
| 25 | 1 | foreach ($actions as $id => $attributes) { |
|
| 26 | $actionRegistry |
||
| 27 | 1 | ->addMethodCall('add', [ |
|
| 28 | 1 | $id, |
|
| 29 | 1 | new Reference($id), |
|
| 30 | ] |
||
| 31 | 1 | ); |
|
| 32 | 1 | } |
|
| 33 | 1 | } |
|
| 34 | } |
||
| 35 |