function EntityTranslationController::entityFormDeleteTranslation

Form submission handler for EntityTranslationController::entityFormAlter().

Takes care of entity translation deletion.

File

drupal/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php, line 402
Definition of Drupal\translation_entity\EntityTranslationController.

Class

EntityTranslationController
Base class for entity translation controllers.

Namespace

Drupal\translation_entity

Code

function entityFormDeleteTranslation($form, &$form_state) {
  $form_controller = translation_entity_form_controller($form_state);
  $entity = $form_controller
    ->getEntity($form_state);
  $base_path = $this
    ->getBasePath($entity);
  $form_langcode = $form_controller
    ->getFormLangcode($form_state);
  $form_state['redirect'] = $base_path . '/translations/delete/' . $form_langcode;
}