From ee01b3c3c82320c907d1cdd4faa21ca3280a7cfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Parafi=C5=84ski?= Date: Fri, 14 Dec 2018 16:15:09 +0100 Subject: [PATCH 1/2] EZP-29764: As a Developer I want to update single Content Type translation (#2484) * Created integration test for updating CT with single new translation * EZP-29764: As a Developer I want to update single Content Type translation * EZP-29764: Replace UpdateStruct with Type object for update content type method * EZP-29764: Handling for content type field definitions * EZP-29764: Handling translation for new field definition * EZP-29764: Handling translation for new field definition * EZP-29764: Code review fixes * Add missing language_mask attribute to select query * Fix failing tests * EZP-29764: bc breaks update --- Persistence/Content/Type.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Persistence/Content/Type.php b/Persistence/Content/Type.php index 5b998af02..1ebaef9c8 100644 --- a/Persistence/Content/Type.php +++ b/Persistence/Content/Type.php @@ -188,4 +188,11 @@ class Type extends ValueObject * @var bool */ public $defaultAlwaysAvailable = false; + + /** + * Translations language codes. + * + * @var array + */ + public $languageCodes = []; } From c519a6444b44691d4f1a9cd9a298c19154f19c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Parafi=C5=84ski?= Date: Fri, 14 Dec 2018 16:17:27 +0100 Subject: [PATCH 2/2] EZP-29788: As a developer, I want to delete content type translation (#2494) * EZP-29788: As a developer, I want to delete content type translation * EZP-29788: Move handling into persistence layer * EZP-29788: Code review fix * EZP-29788: Unit tests for new removeContentTypeTranslation method * EZP-29788: BC breaks doc updated * EZP-29788: Changed typehinting for contentTypeId from mixed to int --- Persistence/Content/Type/Handler.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Persistence/Content/Type/Handler.php b/Persistence/Content/Type/Handler.php index d19c6faa0..959625a3a 100644 --- a/Persistence/Content/Type/Handler.php +++ b/Persistence/Content/Type/Handler.php @@ -322,4 +322,12 @@ public function publish($contentTypeId); * @return array */ public function getSearchableFieldMap(); + + /** + * @param int $contentTypeId + * @param string $languageCode + * + * @return \eZ\Publish\SPI\Persistence\Content\Type + */ + public function removeContentTypeTranslation(int $contentTypeId, string $languageCode): Type; }