-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from bdasdoria/main
Translations + Validations + Suppression de pictogrammes n'entraîne pas la suppression des produits
- Loading branch information
Showing
9 changed files
with
97 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Asdoria\SyliusPictogramPlugin\Entity\Pictogram: | ||
constraints: | ||
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: | ||
fields: [ code ] | ||
groups: [ sylius ] | ||
message: 'asdoria.ui.pictogram_group.code.unique' | ||
properties: | ||
code: | ||
- NotBlank: | ||
groups: [ sylius ] | ||
message: 'asdoria.ui.pictogram_group.code.not_blank' | ||
pictogramGroup: | ||
- NotBlank: | ||
groups: [ sylius ] | ||
message: 'asdoria.ui.pictogram.group.not_blank' | ||
image: | ||
- Valid: | ||
groups: [ sylius ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Asdoria\SyliusPictogramPlugin\Entity\PictogramGroup: | ||
constraints: | ||
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: | ||
fields: [ code ] | ||
groups: [ sylius ] | ||
message: 'asdoria.ui.pictogram_group.code.unique' | ||
properties: | ||
code: | ||
- NotBlank: | ||
groups: [ sylius ] | ||
message: 'asdoria.ui.pictogram_group.code.not_blank' | ||
translations: | ||
- Valid: | ||
groups: [ sylius ] |
11 changes: 11 additions & 0 deletions
11
src/Resources/config/validation/pictogram_group_translation.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Asdoria\SyliusPictogramPlugin\Entity\PictogramGroupTranslation: | ||
constraints: | ||
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: | ||
fields: [ name ] | ||
groups: [ sylius ] | ||
message: 'asdoria.ui.pictogram_group.name.unique' | ||
properties: | ||
name: | ||
- NotBlank: | ||
groups: [ sylius ] | ||
message: 'asdoria.ui.pictogram_group_translation.name.not_blank' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Asdoria\SyliusPictogramPlugin\Entity\PictogramImage: | ||
properties: | ||
file: | ||
- NotBlank: | ||
groups: [ sylius ] | ||
message: 'asdoria.ui.image.path.not_blank' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
asdoria: | ||
ui: | ||
pictogram: | ||
group: | ||
not_blank: A pictogram must be linked to a group. | ||
image: | ||
not_blank: A pictogram must have an image to illustrate himself. | ||
pictogram_group: | ||
code: | ||
unique: This code is already taken. | ||
not_blank: The "Code" field can not be empty. | ||
pictogram_group_translation: | ||
name: | ||
unique: The name is already taken. | ||
not_blank: The "Name" field can not be empty. | ||
image: | ||
path: | ||
not_blank: You must upload an image. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
asdoria: | ||
ui: | ||
pictogram: | ||
group: | ||
not_blank: Un pictogramme doit être lié à un groupe. | ||
image: | ||
not_blank: Un pictogramme doit avoir une image d'illustration. | ||
pictogram_group: | ||
code: | ||
unique: Ce code existe déjà. | ||
not_blank: Ce champs ne peut pas être vide. | ||
pictogram_group_translation: | ||
name: | ||
unique: Ce nom est déjà pris. | ||
not_blank: Ce champs ne peut pas être vide. | ||
image: | ||
path: | ||
not_blank: Vous devez choisir une image. |