| @@ 317-326 (lines=10) @@ | ||
| 314 | * @throws \EventEspresso\core\exceptions\InvalidInterfaceException | |
| 315 | * @throws \InvalidArgumentException | |
| 316 | */ | |
| 317 | private function getDatetime(array $attributes) | |
| 318 |     { | |
| 319 |         if (! empty($attributes['datetime_id'])) { | |
| 320 | $datetime = EEM_Datetime::instance()->get_one_by_ID($attributes['datetime_id']); | |
| 321 |             if ($datetime instanceof EE_Datetime) { | |
| 322 | return $datetime; | |
| 323 | } | |
| 324 | } | |
| 325 | return null; | |
| 326 | } | |
| 327 | ||
| 328 | ||
| 329 | /** | |
| @@ 337-346 (lines=10) @@ | ||
| 334 | * @throws \EventEspresso\core\exceptions\InvalidInterfaceException | |
| 335 | * @throws \InvalidArgumentException | |
| 336 | */ | |
| 337 | private function getTicket(array $attributes) | |
| 338 |     { | |
| 339 |         if (! empty($attributes['ticket_id'])) { | |
| 340 | $ticket = EEM_Ticket::instance()->get_one_by_ID($attributes['ticket_id']); | |
| 341 |             if ($ticket instanceof EE_Ticket) { | |
| 342 | return $ticket; | |
| 343 | } | |
| 344 | } | |
| 345 | return null; | |
| 346 | } | |
| 347 | ||
| 348 | ||
| 349 | ||