FIX: Refactor validation and query handling
This commit is contained in:
@ -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,
|
|
||||||
]),
|
]),
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
|
|||||||
@ -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;
|
||||||
|
|
||||||
|
|||||||
@ -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');
|
||||||
|
|||||||
Reference in New Issue
Block a user