function translation_entity_form_controller

Returns the entity form controller for the given form.

Parameters

array $form_state: The form state array holding the entity form controller.

Return value

\Drupal\Core\Entity\EntityFormControllerInterface; An instance of the entity translation form interface or FALSE if not an entity form.

6 calls to translation_entity_form_controller()
EntityTranslationController::entityFormAlter in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php
Implements EntityTranslationControllerInterface::entityFormAlter().
EntityTranslationController::entityFormDelete in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php
Form submission handler for EntityTranslationController::entityFormAlter().
EntityTranslationController::entityFormDeleteTranslation in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php
Form submission handler for EntityTranslationController::entityFormAlter().
EntityTranslationController::entityFormEntityBuild in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php
Entity builder method.
EntityTranslationController::entityFormSourceChange in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php
Form submission handler for EntityTranslationController::entityFormAlter().

... See full list

File

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

Code

function translation_entity_form_controller(array $form_state) {
  return isset($form_state['controller']) && $form_state['controller'] instanceof EntityFormControllerInterface ? $form_state['controller'] : FALSE;
}