FIX: Refactor validation and query handling

This commit is contained in:
2025-11-19 14:14:49 +01:00
parent 8e5735a9f4
commit 6441fa4901
3 changed files with 3 additions and 4 deletions

View File

@ -43,8 +43,7 @@ class ImageSliderConfigurationType extends TranslatorAwareType
'min' => $minTime, 'min' => $minTime,
'max' => $maxTime, 'max' => $maxTime,
'invalidMessage' => $rangeInvalidMessage, 'invalidMessage' => $rangeInvalidMessage,
'maxMessage' => $rangeInvalidMessage, 'notInRangeMessage' => $rangeInvalidMessage
'minMessage' => $rangeInvalidMessage,
]), ]),
], ],
]) ])

View File

@ -16,7 +16,7 @@ use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
use Symfony\Component\Form\Extension\Core\Type\FileType; use Symfony\Component\Form\Extension\Core\Type\FileType;
use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Translation\TranslatorInterface; use Symfony\Contracts\Translation\TranslatorInterface;
use Symfony\Component\Validator\Constraints\File; use Symfony\Component\Validator\Constraints\File;
use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\Constraints\NotBlank;

View File

@ -57,7 +57,7 @@ final class ImageSliderQueryBuilder extends AbstractDoctrineQueryBuilder
$searchCriteria->getOrderBy(), $searchCriteria->getOrderBy(),
$searchCriteria->getOrderWay() $searchCriteria->getOrderWay()
) )
->setFirstResult($searchCriteria->getOffset()) ->setFirstResult($searchCriteria->getOffset() ?? 0)
->setMaxResults($searchCriteria->getLimit()); ->setMaxResults($searchCriteria->getLimit());
$qb->orderBy('position'); $qb->orderBy('position');