function content_translation_entity_extra_field_info
content_translation_entity_extra_field_info()
Implements hook_entity_extra_field_info().
File
- core/modules/content_translation/content_translation.module, line 352
- Allows entities to be translated into different languages.
Code
function content_translation_entity_extra_field_info() { $extra = array(); foreach (\Drupal::entityManager()->getDefinitions() as $entity_type => $info) { foreach (entity_get_bundles($entity_type) as $bundle => $bundle_info) { if (\Drupal::service('content_translation.manager')->isEnabled($entity_type, $bundle)) { $extra[$entity_type][$bundle]['form']['translation'] = array( 'label' => t('Translation'), 'description' => t('Translation settings'), 'weight' => 10, ); } } } return $extra; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!content_translation!content_translation.module/function/content_translation_entity_extra_field_info/8.1.x