style hero
This commit is contained in:
parent
a5ec57959d
commit
6df3927970
8 changed files with 21 additions and 6 deletions
|
|
@ -73,10 +73,14 @@ return [
|
|||
$mapadoEvent = fetchMapadoEvent($request);
|
||||
|
||||
$duration = null;
|
||||
|
||||
$sessionsToSave = [];
|
||||
|
||||
foreach ($mapadoEvent->eventDateList as $session) {
|
||||
|
||||
$sessionMonth = substr($session->startDate, 0, 7);
|
||||
|
||||
if ($sessionMonth === $requestMonth) {
|
||||
|
||||
$day = intval(substr($session->startDate, 8, 2));
|
||||
$startTime = substr($session->startDate, 11, 5);
|
||||
$eventDateId = explode('/', $session->{'@id'});
|
||||
|
|
@ -93,9 +97,16 @@ return [
|
|||
"duration" => $duration,
|
||||
"ticketingUrl" => 'https://cdn-besancon.mapado.com/event/' . $mapadoEvent->slug . '?eventDate=' . $eventDateId
|
||||
]);
|
||||
}
|
||||
|
||||
$sessionsToSave[] = [
|
||||
"date" => substr($session->startDate, 0, 10),
|
||||
"time" => str_replace(':', 'h', $startTime)
|
||||
];
|
||||
}
|
||||
}
|
||||
$event->update([
|
||||
"sessions" => $sessionsToSave
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
1
site/snippets/events-grid.php
Normal file
1
site/snippets/events-grid.php
Normal file
|
|
@ -0,0 +1 @@
|
|||
<div class="events-grid"></div>
|
||||
|
|
@ -8,4 +8,5 @@
|
|||
</div>
|
||||
</div>
|
||||
<?php snippet('calendar-strip') ?>
|
||||
<?php snippet('events-grid') ?>
|
||||
<?php snippet('footer') ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue