From 5c0c1fec1dd9de5cbf49f01d846e9f90331f4e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Niedzielski?= Date: Thu, 9 Nov 2023 13:06:44 +0100 Subject: [PATCH] IBX-4123: [Backport] Added `/languages` and `/languages/{code}` endpoints (cherry picked from commit 674e612e176bc85556513a716556d643f81d722d) --- src/bundle/Resources/config/routing.yml | 7 +++---- src/bundle/Resources/config/services.yml | 2 +- src/bundle/Resources/config/value_object_visitors.yml | 6 +++--- src/lib/Server/Controller/Language.php | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/bundle/Resources/config/routing.yml b/src/bundle/Resources/config/routing.yml index 2663e92..a196a5b 100644 --- a/src/bundle/Resources/config/routing.yml +++ b/src/bundle/Resources/config/routing.yml @@ -384,16 +384,15 @@ ezpublish_rest_setObjectStatesForContent: # Languages - ibexa.rest.languages.list: path: /languages methods: [GET] - controller: Ibexa\Rest\Server\Controller\Language::listLanguages + controller: EzSystems\EzPlatformRest\Server\Controller\Language::listLanguages ibexa.rest.languages.view: path: /languages/{languageCode} methods: [GET] - controller: Ibexa\Rest\Server\Controller\Language::loadLanguage + controller: EzSystems\EzPlatformRest\Server\Controller\Language::loadLanguage # Locations @@ -595,7 +594,7 @@ ezpublish_rest_loadContentTypeFieldDefinition: requirements: contentTypeId: \d+ fieldDefinitionId: \d+ - + ibexa.rest.load_content_type_field_definition_by_identifier: path: /content/types/{contentTypeId}/fieldDefinition/{fieldDefinitionIdentifier} controller: ezpublish_rest.controller.content_type:loadContentTypeFieldDefinitionByIdentifier diff --git a/src/bundle/Resources/config/services.yml b/src/bundle/Resources/config/services.yml index fc814a1..8f98139 100644 --- a/src/bundle/Resources/config/services.yml +++ b/src/bundle/Resources/config/services.yml @@ -177,7 +177,7 @@ services: - "@ezpublish.api.service.location" tags: [controller.service_arguments] - Ibexa\Rest\Server\Controller\Language: + EzSystems\EzPlatformRest\Server\Controller\Language: autowire: true tags: [ controller.service_arguments ] diff --git a/src/bundle/Resources/config/value_object_visitors.yml b/src/bundle/Resources/config/value_object_visitors.yml index 4c76b2e..634cbe8 100644 --- a/src/bundle/Resources/config/value_object_visitors.yml +++ b/src/bundle/Resources/config/value_object_visitors.yml @@ -206,10 +206,10 @@ services: - { name: ezpublish_rest.output.value_object_visitor, type: Symfony\Component\HttpKernel\Exception\HttpException } # Language - Ibexa\Rest\Server\Output\ValueObjectVisitor\LanguageList: - parent: Ibexa\Contracts\Rest\Output\ValueObjectVisitor + EzSystems\EzPlatformRest\Server\Output\ValueObjectVisitor\LanguageList: + parent: ezpublish_rest.output.value_object_visitor.base tags: - - { name: ibexa.rest.output.value_object.visitor, type: Ibexa\Rest\Server\Values\LanguageList } + - { name: ibexa.rest.output.value_object.visitor, type: EzSystems\EzPlatformRest\Server\Values\LanguageList } ezpublish_rest.output.value_object_visitor.Language: parent: ezpublish_rest.output.value_object_visitor.base diff --git a/src/lib/Server/Controller/Language.php b/src/lib/Server/Controller/Language.php index 773e9bc..678213d 100644 --- a/src/lib/Server/Controller/Language.php +++ b/src/lib/Server/Controller/Language.php @@ -6,7 +6,7 @@ */ declare(strict_types=1); -namespace Ibexa\Rest\Server\Controller; +namespace EzSystems\EzPlatformRest\Server\Controller; use eZ\Publish\API\Repository\LanguageService; use eZ\Publish\API\Repository\Values\Content\Language as ApiLanguage;