content_translation_form_alter

content_translation_form_alter(array &$form, FormStateInterface $form_state) Implements hook_form_alter(). File core/modules/content_translation/content_translation.module, line 291 Allows entities to be translated into different languages. Code function content_translation_form_alter(array &$form, FormStateInterface $form_state) { $form_object = $form_state->getFormObject(); if (!($form_object instanceof ContentEntityFormInterface)) { return; } $entity = $form_object-&

content_translation_field_sync_widget

content_translation_field_sync_widget(FieldDefinitionInterface $field, $element_name = 'third_party_settings[content_translation][translation_sync]') Returns a form element to configure field synchronization. Parameters \Drupal\Core\Field\FieldDefinitionInterface $field: A field definition object. string $element_name: (optional) The element name, which is added to drupalSettings so that javascript can manipulate the form element. Return value array A form element to configure field synchroni

content_translation_field_info_alter

content_translation_field_info_alter(&$info) Implements hook_field_info_alter(). Content translation extends the @FieldType annotation with following key: column_groups: contains information about the field type properties which columns should be synchronized across different translations and which are translatable. This is useful for instance to translate the "alt" and "title" textual elements of an image field, while keeping the same image on every translation. Each group has the followi

content_translation_entity_type_alter

content_translation_entity_type_alter(array &$entity_types) Implements hook_entity_type_alter(). The content translation UI relies on the entity info to provide its features. See the documentation of hook_entity_type_build() in the Entity API documentation for more details on all the entity info keys that may be defined. To make Content Translation automatically support an entity type some keys may need to be defined, but none of them is required unless the entity path is different from the

content_translation_entity_presave

content_translation_entity_presave(EntityInterface $entity) Implements hook_entity_presave(). File core/modules/content_translation/content_translation.module, line 409 Allows entities to be translated into different languages. Code function content_translation_entity_presave(EntityInterface $entity) { if ($entity instanceof ContentEntityInterface && $entity->isTranslatable() && !$entity->isNew()) { // If we are creating a new translation we need to use the source

content_translation_entity_operation

content_translation_entity_operation(EntityInterface $entity) Implements hook_entity_operation(). File core/modules/content_translation/content_translation.module, line 226 Allows entities to be translated into different languages. Code function content_translation_entity_operation(EntityInterface $entity) { $operations = array(); if ($entity->hasLinkTemplate('drupal:content-translation-overview') && content_translation_translate_access($entity)->isAllowed()) { $operatio

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(); $bundle_info_service = \Drupal::service('entity_type.bundle.info'); foreach (\Drupal::entityManager()->getDefinitions() as $entity_type => $info) { foreach ($bundle_info_service-

content_translation_entity_bundle_info_alter

content_translation_entity_bundle_info_alter(&$bundles) 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_transla

content_translation_entity_base_field_info

content_translation_entity_base_field_info(EntityTypeInterface $entity_type) Implements hook_entity_base_field_info(). File core/modules/content_translation/content_translation.module, line 174 Allows entities to be translated into different languages. Code function content_translation_entity_base_field_info(EntityTypeInterface $entity_type) { /** @var \Drupal\content_translation\ContentTranslationManagerInterface $manager */ $manager = \Drupal::service('content_translation.manager'); $

content_translation_enable_widget

content_translation_enable_widget($entity_type, $bundle, array &$form, FormStateInterface $form_state) Returns a widget to enable content translation per entity bundle. Backward compatibility layer to support entities not using the language configuration form element. @todo Remove once all core entities have language configuration. Parameters string $entity_type: The type of the entity being configured for translation. string $bundle: The bundle of the entity being configured for translati