<?php
namespace App\Listener;
use App\Repository\AppSettingRepository;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Twig\Environment;
class TemplateGlobals
{
public function __construct(private AppSettingRepository $repository, private Environment $template)
{
}
public function __invoke(RequestEvent $event)
{
// $this->template->addGlobal(AppSetting::APP_TITLE, $this->repository->value(AppSetting::APP_TITLE));
// $this->template->addGlobal(AppSetting::APP_CONTACT, $this->repository->value(AppSetting::APP_CONTACT));
// $this->template->addGlobal(AppSetting::APP_PHONE, $this->repository->value(AppSetting::APP_PHONE));
}
}