From 0fbe8ccb32f767a8e0babe587a240aef2cebe1af Mon Sep 17 00:00:00 2001
From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
Date: Mon, 20 Nov 2023 19:07:36 +0100
Subject: [PATCH] IBX-6338: Fixed typo in sort definition (#34)
---
src/bundle/Form/Type/SearchType.php | 2 +-
...nChoiceType.php => SortingDefinitionChoiceType.php} | 2 +-
src/bundle/Resources/config/forms.yaml | 4 ++--
src/bundle/Resources/config/sorting_definitions.yaml | 2 +-
.../Resources/translations/ibexa_search.en.xliff | 4 ++--
...face.php => SortingDefinitionProviderInterface.php} | 2 +-
.../Provider/DateSortingDefinitionProvider.php | 4 ++--
...nProvider.php => NameSortingDefinitionProvider.php} | 10 +++++-----
.../Provider/RelevanceSortingDefinitionProvider.php | 6 +++---
.../SortingDefinition/SortingDefinitionRegistry.php | 4 ++--
...rTest.php => NameSortingDefinitionProviderTest.php} | 8 ++++----
.../RelevanceSortingDefinitionProviderTest.php | 4 ++--
.../SortingDefinitionRegistryTest.php | 6 +++---
13 files changed, 29 insertions(+), 29 deletions(-)
rename src/bundle/Form/Type/{SortingDefintionChoiceType.php => SortingDefinitionChoiceType.php} (96%)
rename src/contracts/SortingDefinition/{SortingDefintionProviderInterface.php => SortingDefinitionProviderInterface.php} (90%)
rename src/lib/SortingDefinition/Provider/{NameSortingDefintionProvider.php => NameSortingDefinitionProvider.php} (87%)
rename tests/lib/SortingDefinition/Provider/{NameSortingDefintionProviderTest.php => NameSortingDefinitionProviderTest.php} (92%)
diff --git a/src/bundle/Form/Type/SearchType.php b/src/bundle/Form/Type/SearchType.php
index 21f4e75..96b974f 100644
--- a/src/bundle/Form/Type/SearchType.php
+++ b/src/bundle/Form/Type/SearchType.php
@@ -83,7 +83,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
$builder->add(
'sort',
- SortingDefintionChoiceType::class,
+ SortingDefinitionChoiceType::class,
[
'property_path' => 'sortingDefinition',
]
diff --git a/src/bundle/Form/Type/SortingDefintionChoiceType.php b/src/bundle/Form/Type/SortingDefinitionChoiceType.php
similarity index 96%
rename from src/bundle/Form/Type/SortingDefintionChoiceType.php
rename to src/bundle/Form/Type/SortingDefinitionChoiceType.php
index 3db0c09..9730778 100644
--- a/src/bundle/Form/Type/SortingDefintionChoiceType.php
+++ b/src/bundle/Form/Type/SortingDefinitionChoiceType.php
@@ -14,7 +14,7 @@
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\OptionsResolver\OptionsResolver;
-final class SortingDefintionChoiceType extends AbstractType
+final class SortingDefinitionChoiceType extends AbstractType
{
private SortingDefinitionRegistryInterface $sortingDefinitionRegistry;
diff --git a/src/bundle/Resources/config/forms.yaml b/src/bundle/Resources/config/forms.yaml
index 578bf26..5fe5211 100644
--- a/src/bundle/Resources/config/forms.yaml
+++ b/src/bundle/Resources/config/forms.yaml
@@ -41,11 +41,11 @@ services:
tags:
- { name: form.type, alias: Ibexa\Bundle\Search\Form\Type\SectionChoiceType }
- Ibexa\Bundle\Search\Form\Type\SortingDefintionChoiceType:
+ Ibexa\Bundle\Search\Form\Type\SortingDefinitionChoiceType:
arguments:
$sortingDefinitionRegistry: '@Ibexa\Contracts\Search\SortingDefinition\SortingDefinitionRegistryInterface'
tags:
- - { name: form.type, alias: Ibexa\Bundle\Search\Form\Type\SortingDefintionChoiceType }
+ - { name: form.type, alias: Ibexa\Bundle\Search\Form\Type\SortingDefinitionChoiceType }
Ibexa\Bundle\Search\Form\Type\SearchUsersType:
arguments:
diff --git a/src/bundle/Resources/config/sorting_definitions.yaml b/src/bundle/Resources/config/sorting_definitions.yaml
index fa15759..23f6bb3 100644
--- a/src/bundle/Resources/config/sorting_definitions.yaml
+++ b/src/bundle/Resources/config/sorting_definitions.yaml
@@ -4,7 +4,7 @@ services:
autowire: true
public: false
- Ibexa\Search\SortingDefinition\Provider\NameSortingDefintionProvider:
+ Ibexa\Search\SortingDefinition\Provider\NameSortingDefinitionProvider:
tags:
- name: ibexa.search.sorting_definition.provider
diff --git a/src/bundle/Resources/translations/ibexa_search.en.xliff b/src/bundle/Resources/translations/ibexa_search.en.xliff
index 6c18ede..a9fae90 100644
--- a/src/bundle/Resources/translations/ibexa_search.en.xliff
+++ b/src/bundle/Resources/translations/ibexa_search.en.xliff
@@ -136,10 +136,10 @@
Sort by name Z-A
key: sort_definition.name_desc.label
-
+
Sort by relevance
- key: sort_defintion.relevance.label
+ key: sort_definition.relevance.label