function content_translation_module_implements_alter
Same name in other branches
- 9 core/modules/content_translation/content_translation.module \content_translation_module_implements_alter()
- 8.9.x core/modules/content_translation/content_translation.module \content_translation_module_implements_alter()
- 10 core/modules/content_translation/content_translation.module \content_translation_module_implements_alter()
Implements hook_module_implements_alter().
File
-
core/
modules/ content_translation/ content_translation.module, line 59
Code
function content_translation_module_implements_alter(&$implementations, $hook) {
switch ($hook) {
// Move our hook_entity_type_alter() implementation to the end of the list.
case 'entity_type_alter':
$group = $implementations['content_translation'];
unset($implementations['content_translation']);
$implementations['content_translation'] = $group;
break;
// Move our hook_entity_bundle_info_alter() implementation to the top of the
// list, so that any other hook implementation can rely on bundles being
// correctly marked as translatable.
case 'entity_bundle_info_alter':
$group = $implementations['content_translation'];
$implementations = [
'content_translation' => $group,
] + $implementations;
break;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.