Bugfix
This commit is contained in:
@@ -2,23 +2,24 @@
|
|||||||
|
|
||||||
namespace MummertMedia\ContaoMeilisearchBundle\Controller\FrontendModule;
|
namespace MummertMedia\ContaoMeilisearchBundle\Controller\FrontendModule;
|
||||||
|
|
||||||
use Contao\FrontendModule;
|
use Contao\CoreBundle\Controller\AbstractFrontendModuleController;
|
||||||
|
use Contao\ModuleModel;
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
|
||||||
class MeilisearchSearchController extends FrontendModule
|
class MeilisearchSearchController extends AbstractFrontendModuleController
|
||||||
{
|
{
|
||||||
/**
|
protected function getResponse(
|
||||||
* Template
|
ModuleModel $model,
|
||||||
*/
|
string $section,
|
||||||
protected $strTemplate = 'mod_meilisearch_search';
|
array $classes = null,
|
||||||
|
Request $request = null
|
||||||
/**
|
): Response {
|
||||||
* Compile the frontend module
|
return $this->render(
|
||||||
*/
|
'mod_meilisearch_search.html.twig',
|
||||||
protected function compile(): void
|
[
|
||||||
{
|
'meiliLimit' => (int) ($model->meiliLimit ?: 50),
|
||||||
// Fallback, falls das Feld leer ist
|
]
|
||||||
$limit = (int) ($this->meiliLimit ?: 50);
|
);
|
||||||
|
|
||||||
$this->Template->meiliLimit = $limit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user