Ok, vielen Dank Spooky, hab's jetzt hinbekommen.
Ich hab den Controller:
PHP-Code:
use Contao\CoreBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Twig\Environment as TwigEnvironment;
class SettingsController extends AbstractController
{
private $twig;
public function __construct(TwigEnvironment $twig)
{
$this->twig = $twig;
}
public function showSettings(): Response
{
return new Response($this->twig->render(
'@GeorgPreisslJobs/be_georgpreissl_jobs_settings.html.twig',
[
'title' => $GLOBALS['TL_LANG']['MOD']['georgpreissl_jobs_settings'][0]
]
));
}
}
... auf folgende Weise abgeändert:
PHP-Code:
use Contao\CoreBundle\Controller\AbstractBackendController;
use Symfony\Component\HttpFoundation\Response;
class SettingsController extends AbstractBackendController
{
public function showSettings(): Response
{
return $this->render(
'@GeorgPreisslJobs/be_georgpreissl_jobs_settings.html.twig',
[
'title' => $GLOBALS['TL_LANG']['MOD']['georgpreissl_jobs_settings'][0]
]
);
}
}
... d.h. folgendes gemacht:
- nicht den "AbstractController" sondern den "AbstractBackendController" verwendet
- auf die "TwigEnvironment" verzichtet beim Response
... vielleicht hilft das Snippet ja mal jemanden