From ec3616fdc90bd2919e18a154f963387a629a4de6 Mon Sep 17 00:00:00 2001 From: webchick <webchick@24967.no-reply.drupal.org> Date: Tue, 8 Oct 2013 21:55:34 -0700 Subject: [PATCH] Issue #1810330 by c4doug, plach, YesCT: Remove EntityTranslationControllerInterface::removeTranslation(). --- .../content_translation/content_translation.pages.inc | 2 +- .../ContentTranslationController.php | 7 ------- .../ContentTranslationControllerInterface.php | 10 ---------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/core/modules/content_translation/content_translation.pages.inc b/core/modules/content_translation/content_translation.pages.inc index e08a498f1b8f..552c87b3710d 100644 --- a/core/modules/content_translation/content_translation.pages.inc +++ b/core/modules/content_translation/content_translation.pages.inc @@ -265,7 +265,7 @@ function content_translation_delete_confirm_submit(array $form, array &$form_sta $controller = content_translation_controller($entity->entityType()); // Remove the translated values. - $controller->removeTranslation($entity, $language->id); + $entity->removeTranslation($language->id); $entity->save(); // Remove any existing path alias for the removed translation. diff --git a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php index 60460d82c902..c4998068fe6f 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php @@ -42,13 +42,6 @@ public function __construct($entity_type, $entity_info) { $this->entityInfo = $entity_info; } - /** - * {@inheritdoc} - */ - public function removeTranslation(EntityInterface $entity, $langcode) { - $entity->removeTranslation($langcode); - } - /** * Implements ContentTranslationControllerInterface::retranslate(). */ diff --git a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationControllerInterface.php b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationControllerInterface.php index 109747e86cbf..d04665579c2f 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationControllerInterface.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationControllerInterface.php @@ -139,16 +139,6 @@ public function getTranslationAccess(EntityInterface $entity, $op); */ public function getSourceLangcode(array $form_state); - /** - * Removes the translation values from the given entity. - * - * @param \Drupal\Core\Entity\EntityInterface $entity - * The entity whose values should be removed. - * @param string $langcode - * The language code identifying the translation being deleted. - */ - public function removeTranslation(EntityInterface $entity, $langcode); - /** * Marks translations as outdated. * -- GitLab