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.

6 calls to translation_entity_controller()
EntityTranslationTestBase::setUp in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationTestBase.php
Sets up a Drupal site for running functional and integration tests.
translation_entity_add_page in drupal/core/modules/translation_entity/translation_entity.pages.inc
Page callback for the translation addition page.
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().

... See full list

File

drupal/core/modules/translation_entity/translation_entity.module, line 505
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['controllers']['translation']($entity_type, $entity_info);
}