vendor/contao/core-bundle/src/Controller/FrontendModule/TemplateController.php line 21

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * This file is part of Contao.
  5.  *
  6.  * (c) Leo Feyer
  7.  *
  8.  * @license LGPL-3.0-or-later
  9.  */
  10. namespace Contao\CoreBundle\Controller\FrontendModule;
  11. use Contao\ModuleModel;
  12. use Contao\StringUtil;
  13. use Contao\Template;
  14. use Symfony\Component\HttpFoundation\Request;
  15. use Symfony\Component\HttpFoundation\Response;
  16. class TemplateController extends AbstractFrontendModuleController
  17. {
  18.     protected function getResponse(Template $templateModuleModel $modelRequest $request): Response
  19.     {
  20.         $data StringUtil::deserialize($model->datatrue);
  21.         $template->keys array_combine(
  22.             array_column($data'key'),
  23.             array_column($data'value')
  24.         );
  25.         // Backwards compatibililty
  26.         $template->data $data;
  27.         return $template->getResponse();
  28.     }
  29. }