Completed
Push — master ( 76b5db...d28136 )
by Julito
13:35
created

RepositoryCompilerClass::process()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 2
c 1
b 0
f 0
nop 1
dl 0
loc 4
rs 10
nc 2
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CoreBundle\DependencyInjection\Compiler;
5
6
use Chamilo\CoreBundle\ToolChain;
7
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
use Symfony\Component\DependencyInjection\Reference;
10
11
/**
12
 * Class ToolCompilerClass.
13
 * Search the services with tag "chamilo_core.tool" in order to be added
14
 * as a tool (Documents, Notebook, etc).
15
 *
16
 * See:
17
 * https://symfony.com/doc/current/service_container/tags.html
18
 */
19
class RepositoryCompilerClass implements CompilerPassInterface
20
{
21
    public function process(ContainerBuilder $container)
22
    {
23
        if (!$container->has(ToolChain::class)) {
24
            return;
25
        }
26
27
        /*$taggedServices = $container->findTaggedServiceIds('chamilo_core.resource_repository');
28
        foreach ($taggedServices as $id => $attributes) {
29
            $definition = $container->getDefinition($id);
30
            $definition->setArguments([$definition->getClass()]);
31
        }*/
32
    }
33
}
34