Skip to content
Snippets Groups Projects
Commit c3731dfd authored by James Williams's avatar James Williams
Browse files

Issue #3098399: Path alias fallback alter hook compatibility

This prepares for the alter hook approach for the path_alias module
taken in https://www.drupal.org/project/drupal/issues/3091336
parent 2ac5a6d9
No related branches found
No related tags found
No related merge requests found
Pipeline #136493 passed with warnings
......@@ -18,6 +18,23 @@ use Drupal\language\ConfigurableLanguageInterface;
use Drupal\language\Entity\ConfigurableLanguage;
use Drupal\views\ViewExecutable;
/**
* Implements hook_module_implements_alter().
*/
function language_hierarchy_module_implements_alter(&$implementations, $hook) {
switch ($hook) {
case 'language_fallback_candidates_path_alias_alter':
// Ensure language_hierarchy_language_fallback_candidates_alter() would
// run after path_alias_language_fallback_candidates_path_alias_alter().
if (isset($implementations['language_hierarchy']) && isset($implementations['path_alias'])) {
$group = $implementations['language_hierarchy'];
unset($implementations['language_hierarchy']);
$implementations['language_hierarchy'] = $group;
}
break;
}
}
/**
* Implements hook_language_fallback_candidates_alter().
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment