Compare commits
2 Commits
feature/is
...
dfdf2a881f
| Author | SHA1 | Date | |
|---|---|---|---|
| dfdf2a881f | |||
| b6acb9f011 |
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
is_imageslider/vendor/
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user