Skip to content

Commit

Permalink
IBX-4123: [Backport] Added /languages and /languages/{code} endpo…
Browse files Browse the repository at this point in the history
…ints

(cherry picked from commit 674e612e176bc85556513a716556d643f81d722d)
  • Loading branch information
Steveb-p committed Nov 9, 2023
1 parent 0608432 commit 5c0c1fe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
7 changes: 3 additions & 4 deletions src/bundle/Resources/config/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]

Expand Down
6 changes: 3 additions & 3 deletions src/bundle/Resources/config/value_object_visitors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Server/Controller/Language.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5c0c1fe

Please sign in to comment.