| @@ 255-271 (lines=17) @@ | ||
| 252 | * @param stdClass $event |
|
| 253 | * @param array $formattedEvent |
|
| 254 | */ |
|
| 255 | private function addPriceInfo($event, &$formattedEvent) |
|
| 256 | { |
|
| 257 | $basePrice = null; |
|
| 258 | ||
| 259 | if (property_exists($event, 'priceInfo') && is_array($event->priceInfo)) { |
|
| 260 | ||
| 261 | foreach ($event->priceInfo as $price) { |
|
| 262 | if ($price->category == 'base') { |
|
| 263 | $basePrice = $price; |
|
| 264 | break; |
|
| 265 | } |
|
| 266 | } |
|
| 267 | } |
|
| 268 | ||
| 269 | $formattedEvent['price'] = |
|
| 270 | $basePrice ? $this->priceFormatter->format($basePrice->price) : 'Niet ingevoerd'; |
|
| 271 | } |
|
| 272 | } |
|
| 273 | ||
| @@ 210-223 (lines=14) @@ | ||
| 207 | ], |
|
| 208 | 'bookingInfo.price' => [ |
|
| 209 | 'name' => 'prijs', |
|
| 210 | 'include' => function ($event) { |
|
| 211 | $basePrice = null; |
|
| 212 | ||
| 213 | if (property_exists($event, 'priceInfo') && is_array($event->priceInfo)) { |
|
| 214 | foreach ($event->priceInfo as $price) { |
|
| 215 | if ($price->category == 'base') { |
|
| 216 | $basePrice = $price; |
|
| 217 | break; |
|
| 218 | } |
|
| 219 | } |
|
| 220 | } |
|
| 221 | ||
| 222 | return $basePrice ? $basePrice->price : ''; |
|
| 223 | }, |
|
| 224 | 'property' => 'bookingInfo' |
|
| 225 | ], |
|
| 226 | 'kansentarief' => [ |
|