You are here

function entity_translation_entity_form_get_handler in Entity Translation 7

Returns the translation handler wrapping the entity being edited.

Parameters

$form: The entity form.

$form_state: A keyed array containing the current state of the form.

Return value

EntityTranslationHandlerInterface A class implementing EntityTranslationHandlerInterface.

8 calls to entity_translation_entity_form_get_handler()
entity_translation_current_form_get_handler in ./entity_translation.module
Returns the translation handler associated to the currently submitted form.
entity_translation_entity_form_delete_translation_submit in ./entity_translation.module
Submit handler for the translation deletion.
entity_translation_entity_form_language_update in ./entity_translation.module
Validation handler for the entity language widget.
entity_translation_entity_form_source_language_submit in ./entity_translation.module
Submit handler for the source language selector.
entity_translation_entity_form_submit in ./entity_translation.module
Submit handler for the entity deletion.

... See full list

File

./entity_translation.module, line 1911

Code

function entity_translation_entity_form_get_handler($form, $form_state) {
  $handler = FALSE;
  if ($info = entity_translation_edit_form_info($form, $form_state)) {
    $handler = entity_translation_get_handler($info['entity type'], $info['entity']);
  }
  return $handler;
}