- //Add session in context
- $context['session'] = [
- 'id' => $id,
- 'date' => $session['date'],
- 'begin' => $session['begin'],
- 'start' => $session['start'],
- 'length' => $session['length'],
- 'stop' => $session['stop'],
- 'rainfall' => $session['rainfall'] !== null ? $session['rainfall'].' mm' : $session['rainfall'],
- 'rainrisk' => $session['rainrisk'] !== null ? ($session['rainrisk']*100).' %' : $session['rainrisk'],
- 'realfeel' => $session['realfeel'] !== null ? $session['realfeel'].' °C' : $session['realfeel'],
- 'realfeelmin' => $session['realfeelmin'] !== null ? $session['realfeelmin'].' °C' : $session['realfeelmin'],
- 'realfeelmax' => $session['realfeelmax'] !== null ? $session['realfeelmax'].' °C' : $session['realfeelmax'],
- 'temperature' => $session['temperature'] !== null ? $session['temperature'].' °C' : $session['temperature'],
- 'temperaturemin' => $session['temperaturemin'] !== null ? $session['temperaturemin'].' °C' : $session['temperaturemin'],
- 'temperaturemax' => $session['temperaturemax'] !== null ? $session['temperaturemax'].' °C' : $session['temperaturemax'],
- 'locked' => $session['locked'],
- 'created' => $session['created'],
- 'updated' => $session['updated'],
- 'title' => $this->translator->trans('Session %id%', ['%id%' => $id]),
- 'application' => null,
- 'location' => [
- 'id' => $session['l_id'],
- 'at' => $this->translator->trans('at '.$session['l_title']),
- 'short' => $this->translator->trans($session['l_short']),
- 'title' => $this->translator->trans($session['l_title']),
- 'address' => $session['l_address'],
- 'zipcode' => $session['l_zipcode'],
- 'city' => $session['l_city'],
- 'latitude' => $session['l_latitude'],
- 'longitude' => $session['l_longitude']
- ],
- 'slot' => [
- 'id' => $session['t_id'],
- 'title' => $this->translator->trans($session['t_title'])
- ],
- 'snippet' => [
- 'id' => $session['p_id'],
- 'description' => $session['p_description'],
- 'class' => $session['p_class'],
- 'contact' => $session['p_contact'],
- 'donate' => $session['p_donate'],
- 'link' => $session['p_link'],
- 'social' => $session['p_social']
- ],
- 'applications' => null
- ];