Compare commits

...

2 Commits

Author SHA1 Message Date
dfdf2a881f FEAT: Add gitignore 2025-11-19 14:57:38 +01:00
b6acb9f011 fix: Update image slider module functionality to PrestaShop 9 2025-11-19 14:50:14 +01:00
4 changed files with 8 additions and 5 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
is_imageslider/vendor/

View File

@ -10,6 +10,7 @@ if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require_once __DIR__ . '/vendor/autoload.php';
}
use Symfony\Component\HttpFoundation\RedirectResponse;
use Oksydan\IsImageslider\Hook\HookInterface;
use Oksydan\IsImageslider\Installer\ImageSliderInstaller;
use PrestaShop\PrestaShop\Adapter\SymfonyContainer;
@ -66,11 +67,11 @@ class Is_imageslider extends Module implements WidgetInterface
return $this->getInstaller()->dropTables() && parent::uninstall();
}
public function getContent(): void
public function getContent()
{
\Tools::redirectAdmin(SymfonyContainer::getInstance()->get('router')->generate('is_imageslider_controller'));
$url = SymfonyContainer::getInstance()->get('router')->generate('is_imageslider_controller');
return new RedirectResponse($url);
}
/**
* @template T
*

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\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Constraints\File;
use Symfony\Component\Validator\Constraints\NotBlank;

View File

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