function EntityTranslationController::entityFormDelete

Form submission handler for EntityTranslationController::entityFormAlter().

Takes care of entity deletion.

File

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

Class

EntityTranslationController
Base class for entity translation controllers.

Namespace

Drupal\translation_entity

Code

function entityFormDelete($form, &$form_state) {
  $form_controller = translation_entity_form_controller($form_state);
  $entity = $form_controller
    ->getEntity($form_state);
  if (count($entity
    ->getTranslationLanguages()) > 1) {
    drupal_set_message(t('This will delete all the translations of %label.', array(
      '%label' => $entity
        ->label(),
    )), 'warning');
  }
}