use Drupal\Core\DependencyInjection\ServiceModifierInterface;
use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Dflydev\DotAccessConfiguration\ConfigurationInterface;
/**
* Class DrupalServiceModifier
*/
protected $generatorTag;
+ protected $configuration;
+
/**
* DrupalServiceModifier constructor.
*
- * @param string $root
- * @param string $serviceTag
- * @param string $generatorTag
+ * @param string $root
+ * @param string $serviceTag
+ * @param string $generatorTag
+ * @param ConfigurationInterface $configuration
*/
public function __construct(
$root = null,
$serviceTag,
- $generatorTag
+ $generatorTag,
+ $configuration
) {
$this->root = $root;
$this->commandTag = $serviceTag;
$this->generatorTag = $generatorTag;
+ $this->configuration = $configuration;
}
/**
public function alter(ContainerBuilder $container)
{
$container->addCompilerPass(
- new DrupalCompilerPass()
+ new DrupalCompilerPass($this->configuration)
);
-
- // $container->addCompilerPass(
- // new FindCommandsCompilerPass($this->commandTag)
- // );
- //
- // $container->addCompilerPass(
- // new FindGeneratorsCompilerPass($this->generatorTag)
- // );
}
}