diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTranslationController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTranslationController.php index 4436f57..08d8935 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTranslationController.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTranslationController.php @@ -8,12 +8,12 @@ namespace Drupal\custom_block; use Drupal\Core\Entity\EntityInterface; -use Drupal\content_translation\ContentTranslationControllerNG; +use Drupal\content_translation\ContentTranslationController; /** * Defines the translation controller class for custom blocks. */ -class CustomBlockTranslationController extends ContentTranslationControllerNG { +class CustomBlockTranslationController extends ContentTranslationController { /** * Overrides ContentTranslationController::entityFormAlter(). diff --git a/core/modules/comment/lib/Drupal/comment/CommentTranslationController.php b/core/modules/comment/lib/Drupal/comment/CommentTranslationController.php index df70b15..4812798 100644 --- a/core/modules/comment/lib/Drupal/comment/CommentTranslationController.php +++ b/core/modules/comment/lib/Drupal/comment/CommentTranslationController.php @@ -9,12 +9,12 @@ namespace Drupal\comment; use Drupal\Core\Entity\EntityInterface; -use Drupal\content_translation\ContentTranslationControllerNG; +use Drupal\content_translation\ContentTranslationController; /** * Defines the translation controller class for comments. */ -class CommentTranslationController extends ContentTranslationControllerNG { +class CommentTranslationController extends ContentTranslationController { /** * Overrides ContentTranslationController::entityFormTitle(). diff --git a/core/modules/content_translation/content_translation.pages.inc b/core/modules/content_translation/content_translation.pages.inc index be151b9..12e87a5 100644 --- a/core/modules/content_translation/content_translation.pages.inc +++ b/core/modules/content_translation/content_translation.pages.inc @@ -273,7 +273,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 77ac782..8fb88cb 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php @@ -43,21 +43,6 @@ public function __construct($entity_type, $entity_info) { } /** - * Implements ContentTranslationControllerInterface::removeTranslation(). - */ - public function removeTranslation(EntityInterface $entity, $langcode) { - // @todo Handle properties. - // Remove field translations. - foreach (field_info_instances($entity->entityType(), $entity->bundle()) as $instance) { - $field_name = $instance['field_name']; - $field = $instance->getField(); - if ($field['translatable']) { - $entity->{$field_name}[$langcode] = array(); - } - } - } - - /** * Implements ContentTranslationControllerInterface::retranslate(). */ public function retranslate(EntityInterface $entity, $langcode = NULL) { 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 109747e..d046655 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationControllerInterface.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationControllerInterface.php @@ -140,16 +140,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. * * @param \Drupal\Core\Entity\EntityInterface $entity diff --git a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationControllerNG.php b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationControllerNG.php deleted file mode 100644 index 61e490d..0000000 --- a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationControllerNG.php +++ /dev/null @@ -1,24 +0,0 @@ -removeTranslation($langcode); - } - -} diff --git a/core/modules/node/lib/Drupal/node/NodeTranslationController.php b/core/modules/node/lib/Drupal/node/NodeTranslationController.php index 9436996..29a2734 100644 --- a/core/modules/node/lib/Drupal/node/NodeTranslationController.php +++ b/core/modules/node/lib/Drupal/node/NodeTranslationController.php @@ -8,12 +8,12 @@ namespace Drupal\node; use Drupal\Core\Entity\EntityInterface; -use Drupal\content_translation\ContentTranslationControllerNG; +use Drupal\content_translation\ContentTranslationController; /** * Defines the translation controller class for nodes. */ -class NodeTranslationController extends ContentTranslationControllerNG { +class NodeTranslationController extends ContentTranslationController { /** * Overrides ContentTranslationController::entityFormAlter(). diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php index 95d74ce..a6209de 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php @@ -26,7 +26,7 @@ * "form" = { * "default" = "Drupal\entity_test\EntityTestFormController" * }, - * "translation" = "Drupal\content_translation\ContentTranslationControllerNG" + * "translation" = "Drupal\content_translation\ContentTranslationController" * }, * base_table = "entity_test", * fieldable = TRUE, diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestCache.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestCache.php index b4a064f..d0b6251 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestCache.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestCache.php @@ -24,7 +24,7 @@ * "form" = { * "default" = "Drupal\entity_test\EntityTestFormController" * }, - * "translation" = "Drupal\content_translation\ContentTranslationControllerNG" + * "translation" = "Drupal\content_translation\ContentTranslationController" * }, * base_table = "entity_test", * fieldable = TRUE, diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMul.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMul.php index 3f7e833..2081873 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMul.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMul.php @@ -24,7 +24,7 @@ * "form" = { * "default" = "Drupal\entity_test\EntityTestFormController" * }, - * "translation" = "Drupal\content_translation\ContentTranslationControllerNG" + * "translation" = "Drupal\content_translation\ContentTranslationController" * }, * base_table = "entity_test_mul", * data_table = "entity_test_mul_property_data", diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMulRev.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMulRev.php index 4a578e2..b8efe1c 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMulRev.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMulRev.php @@ -24,7 +24,7 @@ * "form" = { * "default" = "Drupal\entity_test\EntityTestFormController" * }, - * "translation" = "Drupal\content_translation\ContentTranslationControllerNG" + * "translation" = "Drupal\content_translation\ContentTranslationController" * }, * base_table = "entity_test_mulrev", * data_table = "entity_test_mulrev_property_data", diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php index 0fabcca..9857c25 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php @@ -24,7 +24,7 @@ * "form" = { * "default" = "Drupal\entity_test\EntityTestFormController" * }, - * "translation" = "Drupal\content_translation\ContentTranslationControllerNG" + * "translation" = "Drupal\content_translation\ContentTranslationController" * }, * base_table = "entity_test_rev", * revision_table = "entity_test_rev_revision", diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermTranslationController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermTranslationController.php index 3b50d17..f7c704a 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermTranslationController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermTranslationController.php @@ -8,12 +8,12 @@ namespace Drupal\taxonomy; use Drupal\Core\Entity\EntityInterface; -use Drupal\content_translation\ContentTranslationControllerNG; +use Drupal\content_translation\ContentTranslationController; /** * Defines the translation controller class for terms. */ -class TermTranslationController extends ContentTranslationControllerNG { +class TermTranslationController extends ContentTranslationController { /** * Overrides ContentTranslationController::entityFormAlter(). diff --git a/core/modules/user/lib/Drupal/user/ProfileTranslationController.php b/core/modules/user/lib/Drupal/user/ProfileTranslationController.php index 3392754..5cb9cc8 100644 --- a/core/modules/user/lib/Drupal/user/ProfileTranslationController.php +++ b/core/modules/user/lib/Drupal/user/ProfileTranslationController.php @@ -8,12 +8,12 @@ namespace Drupal\user; use Drupal\Core\Entity\EntityInterface; -use Drupal\content_translation\ContentTranslationControllerNG; +use Drupal\content_translation\ContentTranslationController; /** * Defines the translation controller class for terms. */ -class ProfileTranslationController extends ContentTranslationControllerNG { +class ProfileTranslationController extends ContentTranslationController { /** * Overrides ContentTranslationController::entityFormAlter().