public function EntityTranslationControllerNG::removeTranslation

Overrides \Drupal\translation_entity\EntityTranslationControllerInterface::removeTranslation().

Overrides EntityTranslationController::removeTranslation

File

drupal/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationControllerNG.php, line 27
Contains \Drupal\translation_entity\EntityTranslationControllerNG.

Class

EntityTranslationControllerNG
Test entity translation controller.

Namespace

Drupal\translation_entity

Code

public function removeTranslation(EntityInterface $entity, $langcode) {
  $translation = $entity
    ->getTranslation($langcode);
  foreach ($translation
    ->getPropertyDefinitions() as $property_name => $langcode) {
    $translation->{$property_name} = array();
  }
}