api = $api; } protected function getResponse(Template $template, ModuleModel $model, Request $request): ?Response { $limit = null; $offset = 0; $strFormId = 'joblist-form'; $filterVertragsarten = $this->api->getKatalogByRelationName('StelleVertragsart','ChildEntity'); $filterAbteilung = $this->api->getKatalogByRelationName('StelleAbteilung','Abteilung'); // Populate template vars if ($filterVertragsarten !== null && $filterVertragsarten->TotalItems > 0) { $template->filterVertragsarten = $filterVertragsarten; } if ($filterAbteilung !== null && $filterAbteilung->TotalItems > 0) { $template->filterAbteilung = $filterAbteilung; } $template->formSubmit = $strFormId; // Submit action if jumpTo is defined if ($model->jumpTo && ($jumpTo = PageModel::findByPk($model->jumpTo)) !== null) { $template->formAction = $jumpTo->getFrontendUrl(); } // Add scripts $GLOBALS['TL_BODY']['tomselect'] = Template::generateScriptTag('bundles/vossmedienalox/lib/tomselect/js/tom-select.base.js',false,null); $GLOBALS['TL_CSS']['tomselect'] = 'bundles/vossmedienalox/lib/tomselect/css/tom-select.min.css'; return $template->getResponse(); } }