3 namespace Drupal\Console\Bootstrap;
5 use Drupal\Core\DependencyInjection\ServiceModifierInterface;
6 use Drupal\Core\DependencyInjection\ContainerBuilder;
8 class DrupalServiceModifier implements ServiceModifierInterface
23 protected $commandTag;
28 protected $generatorTag;
36 * DrupalServiceModifier constructor.
39 * @param string $appRoot
40 * @param string $serviceTag
41 * @param string $generatorTag
42 * @param boolean $rebuild
44 public function __construct(
52 $this->appRoot = $appRoot;
53 $this->commandTag = $serviceTag;
54 $this->generatorTag = $generatorTag;
55 $this->rebuild = $rebuild;
62 public function alter(ContainerBuilder $container)
64 $container->addCompilerPass(
65 new AddServicesCompilerPass(
71 $container->addCompilerPass(
72 new FindCommandsCompilerPass($this->commandTag)
74 $container->addCompilerPass(
75 new FindGeneratorsCompilerPass($this->generatorTag)