Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function process(ContainerBuilder $container) { |
||
32 | |||
33 | // Check if the storage manager is defined. |
||
34 | if (false === $container->has(DataTablesManager::SERVICE_NAME)) { |
||
35 | return; |
||
36 | } |
||
37 | |||
38 | // Get the storage manager. |
||
39 | $manager = $container->findDefinition(DataTablesManager::SERVICE_NAME); |
||
40 | |||
41 | // Find all service IDs with DataTables provider tag. |
||
42 | $providers = $container->findTaggedServiceIds(DataTablesProviderInterface::TAG_NAME); |
||
43 | |||
44 | // Register each provider. |
||
45 | foreach ($providers as $id => $tag) { |
||
46 | $manager->addMethodCall("registerProvider", [new Reference($id)]); |
||
47 | } |
||
48 | } |
||
49 | |||
51 |