| Conditions | 4 |
| Paths | 5 |
| Total Lines | 28 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | 2 | public function process(ContainerBuilder $builder) |
|
| 16 | { |
||
| 17 | 2 | if (!$builder->hasDefinition(LAGAdminBundle::SERVICE_ID_ACTION_REGISTRY)) { |
|
| 18 | //die('pas service'); |
||
| 19 | 1 | return; |
|
| 20 | } |
||
| 21 | 1 | $actionRegistry = $builder->getDefinition(LAGAdminBundle::SERVICE_ID_ACTION_REGISTRY); |
|
| 22 | 1 | $defaultActions = LAGAdminBundle::getDefaultActionServiceMapping(); |
|
| 23 | |||
| 24 | 1 | foreach ($defaultActions as $id) { |
|
| 25 | $actionRegistry |
||
| 26 | 1 | ->addMethodCall('add', [ |
|
| 27 | 1 | $id, |
|
| 28 | 1 | new Reference($id), |
|
| 29 | ] |
||
| 30 | ); |
||
| 31 | } |
||
| 32 | 1 | $actions = $builder->findTaggedServiceIds(LAGAdminBundle::SERVICE_TAG_ACTION); |
|
| 33 | |||
| 34 | 1 | foreach ($actions as $id => $attributes) { |
|
| 35 | $actionRegistry |
||
| 36 | 1 | ->addMethodCall('add', [ |
|
| 37 | 1 | $id, |
|
| 38 | 1 | new Reference($id), |
|
| 39 | ] |
||
| 40 | ); |
||
| 41 | } |
||
| 42 | 1 | } |
|
| 43 | } |
||
| 44 |