twig = $twig; $this->tokenManager = $tokenManager; $this->request = $requestStack->getCurrentRequest(); $this->db = $db; $this->translator = $translator; $container = System::getContainer(); $objSession = $container->get('session'); $strKey = Input::get('popup') ? 'popupReferer' : 'referer'; $strRefererId = $this->request->attributes->get('_contao_referer_id'); $session = $objSession->get($strKey); $session[$strRefererId]['current'] = substr(Environment::get('requestUri'), \strlen(Environment::get('path')) + 1); $objSession->set($strKey, $session); } public function __invoke(): Response { System::loadLanguageFile('default'); $GLOBALS['TL_CSS']['cirrus'] = 'bundles/vonrotenbergweinanlieferung/css/backend.css|static'; $GLOBALS['TL_CSS']['cirrus'] = 'bundles/vonrotenbergweinanlieferung/css/daily_schedule_view.scss|static'; $arrData = [ 'request_token' => $this->tokenManager->getDefaultTokenValue(), 'ref' => $this->request->attributes->get('_contao_referer_id') ]; // Handle ajax request pre actions if ($_POST && Environment::get('isAjaxRequest')) { $this->objAjax = new Ajax(Input::post('action')); $this->objAjax->executePreActions(); } // Handle ajax request post actions if ($_POST && Environment::get('isAjaxRequest')) { $dc = new DC_File('tl_vr_wa_slotassistant'); $this->objAjax->executePostActions($dc); } $events = [ [ 'title' => 'Morning Meeting', 'start' => '09:00', 'end' => '10:00', ], [ 'title' => 'Team Stand-up', 'start' => '11:00', 'end' => '11:30', ], [ 'title' => 'Lunch Break', 'start' => '12:00', 'end' => '13:00', ], [ 'title' => 'Client Call', 'start' => '15:00', 'end' => '16:00', ], ]; return new Response( $this->twig->render( '@Contao_VonrotenbergWeinanlieferungBundle/be_wa_daily_schedule.html.twig', [ 'events' => $events, 'date' => new \DateTime() ] ) ); } }