Minor - comment unused code.

pull/3064/head
Julio 5 years ago
parent 0eeefd1964
commit d28136f030
  1. 4
      src/CoreBundle/ChamiloCoreBundle.php
  2. 33
      src/CoreBundle/DependencyInjection/Compiler/RepositoryCompilerClass.php

@ -3,7 +3,7 @@
namespace Chamilo\CoreBundle;
use Chamilo\CoreBundle\DependencyInjection\Compiler\RepositoryCompilerClass;
//use Chamilo\CoreBundle\DependencyInjection\Compiler\RepositoryCompilerClass;
use Chamilo\CoreBundle\DependencyInjection\Compiler\ToolCompilerClass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
@ -17,6 +17,6 @@ class ChamiloCoreBundle extends Bundle
{
parent::build($container);
$container->addCompilerPass(new ToolCompilerClass());
$container->addCompilerPass(new RepositoryCompilerClass());
//$container->addCompilerPass(new RepositoryCompilerClass());
}
}

@ -0,0 +1,33 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\DependencyInjection\Compiler;
use Chamilo\CoreBundle\ToolChain;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
/**
* Class ToolCompilerClass.
* Search the services with tag "chamilo_core.tool" in order to be added
* as a tool (Documents, Notebook, etc).
*
* See:
* https://symfony.com/doc/current/service_container/tags.html
*/
class RepositoryCompilerClass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
{
if (!$container->has(ToolChain::class)) {
return;
}
/*$taggedServices = $container->findTaggedServiceIds('chamilo_core.resource_repository');
foreach ($taggedServices as $id => $attributes) {
$definition = $container->getDefinition($id);
$definition->setArguments([$definition->getClass()]);
}*/
}
}
Loading…
Cancel
Save