| 1 |
<?php |
| 2 |
|
| 3 |
namespace Give\EventTickets\Fields; |
| 4 |
|
| 5 |
use Give\Framework\FieldsAPI\Field; |
| 6 |
|
| 7 |
class EventTickets extends Field |
| 8 |
{ |
| 9 |
protected $title; |
| 10 |
protected $description; |
| 11 |
protected $startDateTime; |
| 12 |
protected $endDateTime; |
| 13 |
protected $ticketTypes = []; |
| 14 |
|
| 15 |
const TYPE = 'eventTickets'; |
| 16 |
|
| 17 |
/** |
| 18 |
* @since 3.6.0 |
| 19 |
*/ |
| 20 |
public function getTitle(): string |
| 21 |
{ |
| 22 |
return $this->title; |
| 23 |
} |
| 24 |
|
| 25 |
/** |
| 26 |
* @since 3.6.0 |
| 27 |
*/ |
| 28 |
public function title(string $title): EventTickets |
| 29 |
{ |
| 30 |
$this->title = $title; |
| 31 |
return $this; |
| 32 |
} |
| 33 |
|
| 34 |
/** |
| 35 |
* @since 3.6.0 |
| 36 |
*/ |
| 37 |
public function getStartDateTime(): string |
| 38 |
{ |
| 39 |
return $this->startDateTime; |
| 40 |
} |
| 41 |
|
| 42 |
/** |
| 43 |
* @since 3.6.0 |
| 44 |
*/ |
| 45 |
public function startDateTime(string $date): EventTickets |
| 46 |
{ |
| 47 |
$this->startDateTime = $date; |
| 48 |
return $this; |
| 49 |
} |
| 50 |
|
| 51 |
/** |
| 52 |
* @since 3.6.0 |
| 53 |
*/ |
| 54 |
public function getEndDateTime(): string |
| 55 |
{ |
| 56 |
return $this->endDateTime; |
| 57 |
} |
| 58 |
|
| 59 |
/** |
| 60 |
* @since 3.20.0 |
| 61 |
*/ |
| 62 |
public function endDateTime(string $date): EventTickets |
| 63 |
{ |
| 64 |
$this->endDateTime = $date; |
| 65 |
|
| 66 |
return $this; |
| 67 |
} |
| 68 |
|
| 69 |
/** |
| 70 |
* @since 3.6.0 |
| 71 |
*/ |
| 72 |
public function getDescription(): string |
| 73 |
{ |
| 74 |
return $this->description; |
| 75 |
} |
| 76 |
|
| 77 |
/** |
| 78 |
* @since 3.6.0 |
| 79 |
*/ |
| 80 |
public function description(string $description): EventTickets |
| 81 |
{ |
| 82 |
$this->description = $description; |
| 83 |
return $this; |
| 84 |
} |
| 85 |
|
| 86 |
/** |
| 87 |
* @since 3.6.0 |
| 88 |
*/ |
| 89 |
public function getTicketTypes(): array |
| 90 |
{ |
| 91 |
return $this->ticketTypes; |
| 92 |
} |
| 93 |
|
| 94 |
/** |
| 95 |
* @since 3.6.0 |
| 96 |
*/ |
| 97 |
public function ticketTypes(array $ticketTypes): EventTickets |
| 98 |
{ |
| 99 |
$this->ticketTypes = $ticketTypes; |
| 100 |
return $this; |
| 101 |
} |
| 102 |
|
| 103 |
} |
| 104 |
|