@@ 311-320 (lines=10) @@ | ||
308 | * @throws \EventEspresso\core\exceptions\InvalidInterfaceException |
|
309 | * @throws \InvalidArgumentException |
|
310 | */ |
|
311 | private function getDatetime(array $attributes) |
|
312 | { |
|
313 | if (! empty($attributes['datetime_id'])) { |
|
314 | $datetime = EEM_Datetime::instance()->get_one_by_ID($attributes['datetime_id']); |
|
315 | if ($datetime instanceof EE_Datetime) { |
|
316 | return $datetime; |
|
317 | } |
|
318 | } |
|
319 | return null; |
|
320 | } |
|
321 | ||
322 | ||
323 | /** |
|
@@ 331-340 (lines=10) @@ | ||
328 | * @throws \EventEspresso\core\exceptions\InvalidInterfaceException |
|
329 | * @throws \InvalidArgumentException |
|
330 | */ |
|
331 | private function getTicket(array $attributes) |
|
332 | { |
|
333 | if (! empty($attributes['ticket_id'])) { |
|
334 | $ticket = EEM_Ticket::instance()->get_one_by_ID($attributes['ticket_id']); |
|
335 | if ($ticket instanceof EE_Ticket) { |
|
336 | return $ticket; |
|
337 | } |
|
338 | } |
|
339 | return null; |
|
340 | } |
|
341 | ||
342 | ||
343 | /** |