function translation_entity_controller

Entity translation controller factory.

Parameters

string $entity_type: The type of the entity being translated.

Return value

\Drupal\translation_entity\EntityTranslationControllerInterface An instance of the entity translation controller interface.

5 calls to translation_entity_controller()
EntityTranslationUITest::testTranslationUI in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationUITest.php
Tests the basic translation UI.
translation_entity_delete_confirm in drupal/core/modules/translation_entity/translation_entity.pages.inc
Form constructor for the translation deletion confirmation.
translation_entity_delete_confirm_submit in drupal/core/modules/translation_entity/translation_entity.pages.inc
Form submission handler for translation_entity_delete_confirm().
translation_entity_form_alter in drupal/core/modules/translation_entity/translation_entity.module
Implements hook_form_alter().
translation_entity_overview in drupal/core/modules/translation_entity/translation_entity.pages.inc
Translations overview page callback.

File

drupal/core/modules/translation_entity/translation_entity.module, line 354
Allows entities to be translated into different languages.

Code

function translation_entity_controller($entity_type) {
  $entity_info = entity_get_info($entity_type);

  // @todo Throw an exception if the key is missing.
  return new $entity_info['translation_controller_class']($entity_type, $entity_info);
}