function content_translation_entity_bundle_info_alter in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/content_translation/content_translation.module \content_translation_entity_bundle_info_alter()
Implements hook_entity_bundle_info_alter().
File
- core/
modules/ content_translation/ content_translation.module, line 163 - Allows entities to be translated into different languages.
Code
function content_translation_entity_bundle_info_alter(&$bundles) {
foreach ($bundles as $entity_type => &$info) {
foreach ($info as $bundle => &$bundle_info) {
$bundle_info['translatable'] = \Drupal::service('content_translation.manager')
->isEnabled($entity_type, $bundle);
}
}
}