Commit 176b576d authored by idebr's avatar idebr Committed by Berdir
Browse files

Issue #3047196 by idebr: Injection on PathautoGenerator (3031650) causes "too...

Issue #3047196 by idebr: Injection on PathautoGenerator (3031650) causes "too few arguments" in at least one case
parent e2935584
......@@ -134,7 +134,7 @@ class PathautoGenerator implements PathautoGeneratorInterface {
* @param \Drupal\pathauto\AliasTypeManager $alias_type_manager
* Manages pathauto alias type plugins.
*/
public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, Token $token, AliasCleanerInterface $alias_cleaner, AliasStorageHelperInterface $alias_storage_helper, AliasUniquifierInterface $alias_uniquifier, MessengerInterface $pathauto_messenger, TranslationInterface $string_translation, TokenEntityMapperInterface $token_entity_mapper, EntityTypeManagerInterface $entity_type_manager, AliasTypeManager $alias_type_manager) {
public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, Token $token, AliasCleanerInterface $alias_cleaner, AliasStorageHelperInterface $alias_storage_helper, AliasUniquifierInterface $alias_uniquifier, MessengerInterface $pathauto_messenger, TranslationInterface $string_translation, TokenEntityMapperInterface $token_entity_mapper, EntityTypeManagerInterface $entity_type_manager, AliasTypeManager $alias_type_manager = NULL) {
$this->configFactory = $config_factory;
$this->moduleHandler = $module_handler;
$this->token = $token;
......@@ -145,7 +145,7 @@ class PathautoGenerator implements PathautoGeneratorInterface {
$this->stringTranslation = $string_translation;
$this->tokenEntityMapper = $token_entity_mapper;
$this->entityTypeManager = $entity_type_manager;
$this->aliasTypeManager = $alias_type_manager;
$this->aliasTypeManager = $alias_type_manager ?: \Drupal::service('plugin.manager.alias_type');
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment