Bugfix
This commit is contained in:
@@ -2,23 +2,24 @@
|
||||
|
||||
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
|
||||
{
|
||||
/**
|
||||
* Template
|
||||
*/
|
||||
protected $strTemplate = 'mod_meilisearch_search';
|
||||
|
||||
/**
|
||||
* Compile the frontend module
|
||||
*/
|
||||
protected function compile(): void
|
||||
{
|
||||
// Fallback, falls das Feld leer ist
|
||||
$limit = (int) ($this->meiliLimit ?: 50);
|
||||
|
||||
$this->Template->meiliLimit = $limit;
|
||||
protected function getResponse(
|
||||
ModuleModel $model,
|
||||
string $section,
|
||||
array $classes = null,
|
||||
Request $request = null
|
||||
): Response {
|
||||
return $this->render(
|
||||
'mod_meilisearch_search.html.twig',
|
||||
[
|
||||
'meiliLimit' => (int) ($model->meiliLimit ?: 50),
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user