Merge pull request #22930 from demeritcowboy/revert-event-timezone
[civicrm-core.git] / CRM / Event / DAO / Event.php
1 <?php
2
3 /**
4 * @package CRM
5 * @copyright CiviCRM LLC https://civicrm.org/licensing
6 *
7 * Generated from xml/schema/CRM/Event/Event.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:894f53608aa8036de5fab1dc90a407d5)
10 */
11
12 /**
13 * Database access object for the Event entity.
14 */
15 class CRM_Event_DAO_Event extends CRM_Core_DAO {
16 const EXT = 'civicrm';
17 const TABLE_ADDED = '1.7';
18 const COMPONENT = 'CiviEvent';
19
20 /**
21 * Static instance to hold the table name.
22 *
23 * @var string
24 */
25 public static $_tableName = 'civicrm_event';
26
27 /**
28 * Icon associated with this entity.
29 *
30 * @var string
31 */
32 public static $_icon = 'fa-calendar';
33
34 /**
35 * Field to show when displaying a record.
36 *
37 * @var string
38 */
39 public static $_labelField = 'title';
40
41 /**
42 * Should CiviCRM log any modifications to this table in the civicrm_log table.
43 *
44 * @var bool
45 */
46 public static $_log = TRUE;
47
48 /**
49 * Paths for accessing this entity in the UI.
50 *
51 * @var string[]
52 */
53 protected static $_paths = [
54 'add' => 'civicrm/event/add?reset=1',
55 'view' => 'civicrm/event/info?reset=1&id=[id]',
56 ];
57
58 /**
59 * Event
60 *
61 * @var int|string|null
62 * (SQL type: int unsigned)
63 * Note that values will be retrieved from the database as a string.
64 */
65 public $id;
66
67 /**
68 * Event Title (e.g. Fall Fundraiser Dinner)
69 *
70 * @var string|null
71 * (SQL type: varchar(255))
72 * Note that values will be retrieved from the database as a string.
73 */
74 public $title;
75
76 /**
77 * Brief summary of event. Text and html allowed. Displayed on Event Registration form and can be used on other CMS pages which need an event summary.
78 *
79 * @var string|null
80 * (SQL type: text)
81 * Note that values will be retrieved from the database as a string.
82 */
83 public $summary;
84
85 /**
86 * Full description of event. Text and html allowed. Displayed on built-in Event Information screens.
87 *
88 * @var string|null
89 * (SQL type: text)
90 * Note that values will be retrieved from the database as a string.
91 */
92 public $description;
93
94 /**
95 * Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.
96 *
97 * @var int|string|null
98 * (SQL type: int unsigned)
99 * Note that values will be retrieved from the database as a string.
100 */
101 public $event_type_id;
102
103 /**
104 * Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.
105 *
106 * @var int|string|null
107 * (SQL type: int unsigned)
108 * Note that values will be retrieved from the database as a string.
109 */
110 public $participant_listing_id;
111
112 /**
113 * Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.
114 *
115 * @var bool|string|null
116 * (SQL type: tinyint)
117 * Note that values will be retrieved from the database as a string.
118 */
119 public $is_public;
120
121 /**
122 * Date and time that event starts.
123 *
124 * @var string|null
125 * (SQL type: datetime)
126 * Note that values will be retrieved from the database as a string.
127 */
128 public $start_date;
129
130 /**
131 * Date and time that event ends. May be NULL if no defined end date/time
132 *
133 * @var string|null
134 * (SQL type: datetime)
135 * Note that values will be retrieved from the database as a string.
136 */
137 public $end_date;
138
139 /**
140 * If true, include registration link on Event Info page.
141 *
142 * @var bool|string|null
143 * (SQL type: tinyint)
144 * Note that values will be retrieved from the database as a string.
145 */
146 public $is_online_registration;
147
148 /**
149 * Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.
150 *
151 * @var string|null
152 * (SQL type: varchar(255))
153 * Note that values will be retrieved from the database as a string.
154 */
155 public $registration_link_text;
156
157 /**
158 * Date and time that online registration starts.
159 *
160 * @var string|null
161 * (SQL type: datetime)
162 * Note that values will be retrieved from the database as a string.
163 */
164 public $registration_start_date;
165
166 /**
167 * Date and time that online registration ends.
168 *
169 * @var string|null
170 * (SQL type: datetime)
171 * Note that values will be retrieved from the database as a string.
172 */
173 public $registration_end_date;
174
175 /**
176 * Maximum number of registered participants to allow. After max is reached, a custom Event Full message is displayed. If NULL, allow unlimited number of participants.
177 *
178 * @var int|string|null
179 * (SQL type: int unsigned)
180 * Note that values will be retrieved from the database as a string.
181 */
182 public $max_participants;
183
184 /**
185 * Message to display on Event Information page and INSTEAD OF Event Registration form if maximum participants are signed up. Can include email address/info about getting on a waiting list, etc. Text and html allowed.
186 *
187 * @var string|null
188 * (SQL type: text)
189 * Note that values will be retrieved from the database as a string.
190 */
191 public $event_full_text;
192
193 /**
194 * If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.
195 *
196 * @var bool|string|null
197 * (SQL type: tinyint)
198 * Note that values will be retrieved from the database as a string.
199 */
200 public $is_monetary;
201
202 /**
203 * Financial type assigned to paid event registrations for this event. Required if is_monetary is true.
204 *
205 * @var int|string|null
206 * (SQL type: int unsigned)
207 * Note that values will be retrieved from the database as a string.
208 */
209 public $financial_type_id;
210
211 /**
212 * Payment Processors configured for this Event (if is_monetary is true)
213 *
214 * @var string|null
215 * (SQL type: varchar(128))
216 * Note that values will be retrieved from the database as a string.
217 */
218 public $payment_processor;
219
220 /**
221 * Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?
222 *
223 * @var bool|string|null
224 * (SQL type: tinyint)
225 * Note that values will be retrieved from the database as a string.
226 */
227 public $is_map;
228
229 /**
230 * Is this Event enabled or disabled/cancelled?
231 *
232 * @var bool|string|null
233 * (SQL type: tinyint)
234 * Note that values will be retrieved from the database as a string.
235 */
236 public $is_active;
237
238 /**
239 * @var string|null
240 * (SQL type: varchar(255))
241 * Note that values will be retrieved from the database as a string.
242 */
243 public $fee_label;
244
245 /**
246 * If true, show event location.
247 *
248 * @var bool|string|null
249 * (SQL type: tinyint)
250 * Note that values will be retrieved from the database as a string.
251 */
252 public $is_show_location;
253
254 /**
255 * FK to Location Block ID
256 *
257 * @var int|string|null
258 * (SQL type: int unsigned)
259 * Note that values will be retrieved from the database as a string.
260 */
261 public $loc_block_id;
262
263 /**
264 * Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.
265 *
266 * @var int|string|null
267 * (SQL type: int unsigned)
268 * Note that values will be retrieved from the database as a string.
269 */
270 public $default_role_id;
271
272 /**
273 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
274 *
275 * @var string|null
276 * (SQL type: text)
277 * Note that values will be retrieved from the database as a string.
278 */
279 public $intro_text;
280
281 /**
282 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
283 *
284 * @var string|null
285 * (SQL type: text)
286 * Note that values will be retrieved from the database as a string.
287 */
288 public $footer_text;
289
290 /**
291 * Title for Confirmation page.
292 *
293 * @var string|null
294 * (SQL type: varchar(255))
295 * Note that values will be retrieved from the database as a string.
296 */
297 public $confirm_title;
298
299 /**
300 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
301 *
302 * @var string|null
303 * (SQL type: text)
304 * Note that values will be retrieved from the database as a string.
305 */
306 public $confirm_text;
307
308 /**
309 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
310 *
311 * @var string|null
312 * (SQL type: text)
313 * Note that values will be retrieved from the database as a string.
314 */
315 public $confirm_footer_text;
316
317 /**
318 * If true, confirmation is automatically emailed to contact on successful registration.
319 *
320 * @var bool|string|null
321 * (SQL type: tinyint)
322 * Note that values will be retrieved from the database as a string.
323 */
324 public $is_email_confirm;
325
326 /**
327 * text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now
328 *
329 * @var string|null
330 * (SQL type: text)
331 * Note that values will be retrieved from the database as a string.
332 */
333 public $confirm_email_text;
334
335 /**
336 * FROM email name used for confirmation emails.
337 *
338 * @var string|null
339 * (SQL type: varchar(255))
340 * Note that values will be retrieved from the database as a string.
341 */
342 public $confirm_from_name;
343
344 /**
345 * FROM email address used for confirmation emails.
346 *
347 * @var string|null
348 * (SQL type: varchar(255))
349 * Note that values will be retrieved from the database as a string.
350 */
351 public $confirm_from_email;
352
353 /**
354 * comma-separated list of email addresses to cc each time a confirmation is sent
355 *
356 * @var string|null
357 * (SQL type: varchar(255))
358 * Note that values will be retrieved from the database as a string.
359 */
360 public $cc_confirm;
361
362 /**
363 * comma-separated list of email addresses to bcc each time a confirmation is sent
364 *
365 * @var string|null
366 * (SQL type: varchar(255))
367 * Note that values will be retrieved from the database as a string.
368 */
369 public $bcc_confirm;
370
371 /**
372 * FK to civicrm_option_value.
373 *
374 * @var int|string|null
375 * (SQL type: int unsigned)
376 * Note that values will be retrieved from the database as a string.
377 */
378 public $default_fee_id;
379
380 /**
381 * FK to civicrm_option_value.
382 *
383 * @var int|string|null
384 * (SQL type: int unsigned)
385 * Note that values will be retrieved from the database as a string.
386 */
387 public $default_discount_fee_id;
388
389 /**
390 * Title for ThankYou page.
391 *
392 * @var string|null
393 * (SQL type: varchar(255))
394 * Note that values will be retrieved from the database as a string.
395 */
396 public $thankyou_title;
397
398 /**
399 * ThankYou Text.
400 *
401 * @var string|null
402 * (SQL type: text)
403 * Note that values will be retrieved from the database as a string.
404 */
405 public $thankyou_text;
406
407 /**
408 * Footer message.
409 *
410 * @var string|null
411 * (SQL type: text)
412 * Note that values will be retrieved from the database as a string.
413 */
414 public $thankyou_footer_text;
415
416 /**
417 * if true - allows the user to send payment directly to the org later
418 *
419 * @var bool|string|null
420 * (SQL type: tinyint)
421 * Note that values will be retrieved from the database as a string.
422 */
423 public $is_pay_later;
424
425 /**
426 * The text displayed to the user in the main form
427 *
428 * @var string|null
429 * (SQL type: text)
430 * Note that values will be retrieved from the database as a string.
431 */
432 public $pay_later_text;
433
434 /**
435 * The receipt sent to the user instead of the normal receipt text
436 *
437 * @var string|null
438 * (SQL type: text)
439 * Note that values will be retrieved from the database as a string.
440 */
441 public $pay_later_receipt;
442
443 /**
444 * is partial payment enabled for this event
445 *
446 * @var bool|string|null
447 * (SQL type: tinyint)
448 * Note that values will be retrieved from the database as a string.
449 */
450 public $is_partial_payment;
451
452 /**
453 * Initial amount label for partial payment
454 *
455 * @var string|null
456 * (SQL type: varchar(255))
457 * Note that values will be retrieved from the database as a string.
458 */
459 public $initial_amount_label;
460
461 /**
462 * Initial amount help text for partial payment
463 *
464 * @var string|null
465 * (SQL type: text)
466 * Note that values will be retrieved from the database as a string.
467 */
468 public $initial_amount_help_text;
469
470 /**
471 * Minimum initial amount for partial payment
472 *
473 * @var float|string|null
474 * (SQL type: decimal(20,2))
475 * Note that values will be retrieved from the database as a string.
476 */
477 public $min_initial_amount;
478
479 /**
480 * if true - allows the user to register multiple participants for event
481 *
482 * @var bool|string|null
483 * (SQL type: tinyint)
484 * Note that values will be retrieved from the database as a string.
485 */
486 public $is_multiple_registrations;
487
488 /**
489 * Maximum number of additional participants that can be registered on a single booking
490 *
491 * @var int|string|null
492 * (SQL type: int unsigned)
493 * Note that values will be retrieved from the database as a string.
494 */
495 public $max_additional_participants;
496
497 /**
498 * if true - allows the user to register multiple registrations from same email address.
499 *
500 * @var bool|string|null
501 * (SQL type: tinyint)
502 * Note that values will be retrieved from the database as a string.
503 */
504 public $allow_same_participant_emails;
505
506 /**
507 * Whether the event has waitlist support.
508 *
509 * @var bool|string|null
510 * (SQL type: tinyint)
511 * Note that values will be retrieved from the database as a string.
512 */
513 public $has_waitlist;
514
515 /**
516 * Whether participants require approval before they can finish registering.
517 *
518 * @var bool|string|null
519 * (SQL type: tinyint)
520 * Note that values will be retrieved from the database as a string.
521 */
522 public $requires_approval;
523
524 /**
525 * Expire pending but unconfirmed registrations after this many hours.
526 *
527 * @var int|string|null
528 * (SQL type: int unsigned)
529 * Note that values will be retrieved from the database as a string.
530 */
531 public $expiration_time;
532
533 /**
534 * Allow self service cancellation or transfer for event?
535 *
536 * @var bool|string|null
537 * (SQL type: tinyint)
538 * Note that values will be retrieved from the database as a string.
539 */
540 public $allow_selfcancelxfer;
541
542 /**
543 * Number of hours prior to event start date to allow self-service cancellation or transfer.
544 *
545 * @var int|string|null
546 * (SQL type: int)
547 * Note that values will be retrieved from the database as a string.
548 */
549 public $selfcancelxfer_time;
550
551 /**
552 * Text to display when the event is full, but participants can signup for a waitlist.
553 *
554 * @var string|null
555 * (SQL type: text)
556 * Note that values will be retrieved from the database as a string.
557 */
558 public $waitlist_text;
559
560 /**
561 * Text to display when the approval is required to complete registration for an event.
562 *
563 * @var string|null
564 * (SQL type: text)
565 * Note that values will be retrieved from the database as a string.
566 */
567 public $approval_req_text;
568
569 /**
570 * whether the event has template
571 *
572 * @var bool|string
573 * (SQL type: tinyint)
574 * Note that values will be retrieved from the database as a string.
575 */
576 public $is_template;
577
578 /**
579 * Event Template Title
580 *
581 * @var string|null
582 * (SQL type: varchar(255))
583 * Note that values will be retrieved from the database as a string.
584 */
585 public $template_title;
586
587 /**
588 * FK to civicrm_contact, who created this event
589 *
590 * @var int|string|null
591 * (SQL type: int unsigned)
592 * Note that values will be retrieved from the database as a string.
593 */
594 public $created_id;
595
596 /**
597 * Date and time that event was created.
598 *
599 * @var string|null
600 * (SQL type: datetime)
601 * Note that values will be retrieved from the database as a string.
602 */
603 public $created_date;
604
605 /**
606 * 3 character string, value from config setting or input via user.
607 *
608 * @var string|null
609 * (SQL type: varchar(3))
610 * Note that values will be retrieved from the database as a string.
611 */
612 public $currency;
613
614 /**
615 * The campaign for which this event has been created.
616 *
617 * @var int|string|null
618 * (SQL type: int unsigned)
619 * Note that values will be retrieved from the database as a string.
620 */
621 public $campaign_id;
622
623 /**
624 * Can people share the event through social media?
625 *
626 * @var bool|string|null
627 * (SQL type: tinyint)
628 * Note that values will be retrieved from the database as a string.
629 */
630 public $is_share;
631
632 /**
633 * If false, the event booking confirmation screen gets skipped
634 *
635 * @var bool|string|null
636 * (SQL type: tinyint)
637 * Note that values will be retrieved from the database as a string.
638 */
639 public $is_confirm_enabled;
640
641 /**
642 * Implicit FK to civicrm_event: parent event
643 *
644 * @var int|string|null
645 * (SQL type: int unsigned)
646 * Note that values will be retrieved from the database as a string.
647 */
648 public $parent_event_id;
649
650 /**
651 * Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.
652 *
653 * @var int|string|null
654 * (SQL type: int unsigned)
655 * Note that values will be retrieved from the database as a string.
656 */
657 public $slot_label_id;
658
659 /**
660 * Rule to use when matching registrations for this event
661 *
662 * @var int|string|null
663 * (SQL type: int unsigned)
664 * Note that values will be retrieved from the database as a string.
665 */
666 public $dedupe_rule_group_id;
667
668 /**
669 * if true than billing block is required this event
670 *
671 * @var bool|string|null
672 * (SQL type: tinyint)
673 * Note that values will be retrieved from the database as a string.
674 */
675 public $is_billing_required;
676
677 /**
678 * Class constructor.
679 */
680 public function __construct() {
681 $this->__table = 'civicrm_event';
682 parent::__construct();
683 }
684
685 /**
686 * Returns localized title of this entity.
687 *
688 * @param bool $plural
689 * Whether to return the plural version of the title.
690 */
691 public static function getEntityTitle($plural = FALSE) {
692 return $plural ? ts('Events') : ts('Event');
693 }
694
695 /**
696 * Returns user-friendly description of this entity.
697 *
698 * @return string
699 */
700 public static function getEntityDescription() {
701 return ts('Scheduled in-person or online events which contacts can register for and attend.');
702 }
703
704 /**
705 * Returns foreign keys and entity references.
706 *
707 * @return array
708 * [CRM_Core_Reference_Interface]
709 */
710 public static function getReferenceColumns() {
711 if (!isset(Civi::$statics[__CLASS__]['links'])) {
712 Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
713 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'loc_block_id', 'civicrm_loc_block', 'id');
714 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'created_id', 'civicrm_contact', 'id');
715 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
716 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'dedupe_rule_group_id', 'civicrm_dedupe_rule_group', 'id');
717 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
718 }
719 return Civi::$statics[__CLASS__]['links'];
720 }
721
722 /**
723 * Returns all the column names of this table
724 *
725 * @return array
726 */
727 public static function &fields() {
728 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
729 Civi::$statics[__CLASS__]['fields'] = [
730 'id' => [
731 'name' => 'id',
732 'type' => CRM_Utils_Type::T_INT,
733 'title' => ts('Event ID'),
734 'description' => ts('Event'),
735 'required' => TRUE,
736 'where' => 'civicrm_event.id',
737 'table_name' => 'civicrm_event',
738 'entity' => 'Event',
739 'bao' => 'CRM_Event_BAO_Event',
740 'localizable' => 0,
741 'html' => [
742 'type' => 'Number',
743 ],
744 'readonly' => TRUE,
745 'add' => '1.7',
746 ],
747 'event_title' => [
748 'name' => 'title',
749 'type' => CRM_Utils_Type::T_STRING,
750 'title' => ts('Event Title'),
751 'description' => ts('Event Title (e.g. Fall Fundraiser Dinner)'),
752 'maxlength' => 255,
753 'size' => CRM_Utils_Type::HUGE,
754 'import' => TRUE,
755 'where' => 'civicrm_event.title',
756 'headerPattern' => '/(event.)?title$/i',
757 'export' => TRUE,
758 'table_name' => 'civicrm_event',
759 'entity' => 'Event',
760 'bao' => 'CRM_Event_BAO_Event',
761 'localizable' => 1,
762 'html' => [
763 'type' => 'Text',
764 ],
765 'add' => '1.7',
766 ],
767 'summary' => [
768 'name' => 'summary',
769 'type' => CRM_Utils_Type::T_TEXT,
770 'title' => ts('Event Summary'),
771 'description' => ts('Brief summary of event. Text and html allowed. Displayed on Event Registration form and can be used on other CMS pages which need an event summary.'),
772 'rows' => 4,
773 'cols' => 60,
774 'where' => 'civicrm_event.summary',
775 'table_name' => 'civicrm_event',
776 'entity' => 'Event',
777 'bao' => 'CRM_Event_BAO_Event',
778 'localizable' => 1,
779 'html' => [
780 'type' => 'TextArea',
781 ],
782 'add' => '1.7',
783 ],
784 'event_description' => [
785 'name' => 'description',
786 'type' => CRM_Utils_Type::T_TEXT,
787 'title' => ts('Event Description'),
788 'description' => ts('Full description of event. Text and html allowed. Displayed on built-in Event Information screens.'),
789 'rows' => 8,
790 'cols' => 60,
791 'where' => 'civicrm_event.description',
792 'table_name' => 'civicrm_event',
793 'entity' => 'Event',
794 'bao' => 'CRM_Event_BAO_Event',
795 'localizable' => 1,
796 'html' => [
797 'type' => 'RichTextEditor',
798 ],
799 'add' => '1.7',
800 ],
801 'event_type_id' => [
802 'name' => 'event_type_id',
803 'type' => CRM_Utils_Type::T_INT,
804 'title' => ts('Event Type'),
805 'description' => ts('Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.'),
806 'where' => 'civicrm_event.event_type_id',
807 'default' => '0',
808 'table_name' => 'civicrm_event',
809 'entity' => 'Event',
810 'bao' => 'CRM_Event_BAO_Event',
811 'localizable' => 0,
812 'html' => [
813 'type' => 'Select',
814 ],
815 'pseudoconstant' => [
816 'optionGroupName' => 'event_type',
817 'optionEditPath' => 'civicrm/admin/options/event_type',
818 ],
819 'add' => '1.7',
820 ],
821 'participant_listing_id' => [
822 'name' => 'participant_listing_id',
823 'type' => CRM_Utils_Type::T_INT,
824 'title' => ts('Participant Listing'),
825 'description' => ts('Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.'),
826 'where' => 'civicrm_event.participant_listing_id',
827 'default' => NULL,
828 'table_name' => 'civicrm_event',
829 'entity' => 'Event',
830 'bao' => 'CRM_Event_BAO_Event',
831 'localizable' => 0,
832 'html' => [
833 'type' => 'Select',
834 ],
835 'pseudoconstant' => [
836 'optionGroupName' => 'participant_listing',
837 'optionEditPath' => 'civicrm/admin/options/participant_listing',
838 ],
839 'add' => '2.0',
840 ],
841 'is_public' => [
842 'name' => 'is_public',
843 'type' => CRM_Utils_Type::T_BOOLEAN,
844 'title' => ts('Is Event Public'),
845 'description' => ts('Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.'),
846 'where' => 'civicrm_event.is_public',
847 'default' => '1',
848 'table_name' => 'civicrm_event',
849 'entity' => 'Event',
850 'bao' => 'CRM_Event_BAO_Event',
851 'localizable' => 0,
852 'html' => [
853 'type' => 'CheckBox',
854 ],
855 'add' => '1.7',
856 ],
857 'event_start_date' => [
858 'name' => 'start_date',
859 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
860 'title' => ts('Event Start Date'),
861 'description' => ts('Date and time that event starts.'),
862 'import' => TRUE,
863 'where' => 'civicrm_event.start_date',
864 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
865 'export' => TRUE,
866 'table_name' => 'civicrm_event',
867 'entity' => 'Event',
868 'bao' => 'CRM_Event_BAO_Event',
869 'localizable' => 0,
870 'html' => [
871 'type' => 'Select Date',
872 'formatType' => 'activityDateTime',
873 ],
874 'add' => '1.7',
875 ],
876 'event_end_date' => [
877 'name' => 'end_date',
878 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
879 'title' => ts('Event End Date'),
880 'description' => ts('Date and time that event ends. May be NULL if no defined end date/time'),
881 'import' => TRUE,
882 'where' => 'civicrm_event.end_date',
883 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
884 'export' => TRUE,
885 'table_name' => 'civicrm_event',
886 'entity' => 'Event',
887 'bao' => 'CRM_Event_BAO_Event',
888 'localizable' => 0,
889 'html' => [
890 'type' => 'Select Date',
891 'formatType' => 'activityDateTime',
892 ],
893 'add' => '1.7',
894 ],
895 'is_online_registration' => [
896 'name' => 'is_online_registration',
897 'type' => CRM_Utils_Type::T_BOOLEAN,
898 'title' => ts('Is Online Registration'),
899 'description' => ts('If true, include registration link on Event Info page.'),
900 'where' => 'civicrm_event.is_online_registration',
901 'default' => '0',
902 'table_name' => 'civicrm_event',
903 'entity' => 'Event',
904 'bao' => 'CRM_Event_BAO_Event',
905 'localizable' => 0,
906 'html' => [
907 'type' => 'CheckBox',
908 ],
909 'add' => '1.7',
910 ],
911 'registration_link_text' => [
912 'name' => 'registration_link_text',
913 'type' => CRM_Utils_Type::T_STRING,
914 'title' => ts('Event Registration Link Text'),
915 'description' => ts('Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.'),
916 'maxlength' => 255,
917 'size' => CRM_Utils_Type::HUGE,
918 'where' => 'civicrm_event.registration_link_text',
919 'table_name' => 'civicrm_event',
920 'entity' => 'Event',
921 'bao' => 'CRM_Event_BAO_Event',
922 'localizable' => 1,
923 'html' => [
924 'type' => 'Text',
925 ],
926 'add' => '1.7',
927 ],
928 'registration_start_date' => [
929 'name' => 'registration_start_date',
930 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
931 'title' => ts('Registration Start Date'),
932 'description' => ts('Date and time that online registration starts.'),
933 'where' => 'civicrm_event.registration_start_date',
934 'table_name' => 'civicrm_event',
935 'entity' => 'Event',
936 'bao' => 'CRM_Event_BAO_Event',
937 'localizable' => 0,
938 'html' => [
939 'type' => 'Select Date',
940 'formatType' => 'activityDateTime',
941 'label' => ts("Registration Start Date"),
942 ],
943 'add' => '1.8',
944 ],
945 'registration_end_date' => [
946 'name' => 'registration_end_date',
947 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
948 'title' => ts('Registration End Date'),
949 'description' => ts('Date and time that online registration ends.'),
950 'where' => 'civicrm_event.registration_end_date',
951 'table_name' => 'civicrm_event',
952 'entity' => 'Event',
953 'bao' => 'CRM_Event_BAO_Event',
954 'localizable' => 0,
955 'html' => [
956 'type' => 'Select Date',
957 'formatType' => 'activityDateTime',
958 'label' => ts("Registration End Date"),
959 ],
960 'add' => '1.8',
961 ],
962 'max_participants' => [
963 'name' => 'max_participants',
964 'type' => CRM_Utils_Type::T_INT,
965 'title' => ts('Max Participants'),
966 'description' => ts('Maximum number of registered participants to allow. After max is reached, a custom Event Full message is displayed. If NULL, allow unlimited number of participants.'),
967 'where' => 'civicrm_event.max_participants',
968 'default' => NULL,
969 'table_name' => 'civicrm_event',
970 'entity' => 'Event',
971 'bao' => 'CRM_Event_BAO_Event',
972 'localizable' => 0,
973 'html' => [
974 'type' => 'Text',
975 ],
976 'add' => '1.7',
977 ],
978 'event_full_text' => [
979 'name' => 'event_full_text',
980 'type' => CRM_Utils_Type::T_TEXT,
981 'title' => ts('Event Information'),
982 'description' => ts('Message to display on Event Information page and INSTEAD OF Event Registration form if maximum participants are signed up. Can include email address/info about getting on a waiting list, etc. Text and html allowed.'),
983 'rows' => 4,
984 'cols' => 60,
985 'where' => 'civicrm_event.event_full_text',
986 'table_name' => 'civicrm_event',
987 'entity' => 'Event',
988 'bao' => 'CRM_Event_BAO_Event',
989 'localizable' => 1,
990 'html' => [
991 'type' => 'TextArea',
992 ],
993 'add' => '1.7',
994 ],
995 'is_monetary' => [
996 'name' => 'is_monetary',
997 'type' => CRM_Utils_Type::T_BOOLEAN,
998 'title' => ts('Is this a PAID event?'),
999 'description' => ts('If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.'),
1000 'where' => 'civicrm_event.is_monetary',
1001 'default' => '0',
1002 'table_name' => 'civicrm_event',
1003 'entity' => 'Event',
1004 'bao' => 'CRM_Event_BAO_Event',
1005 'localizable' => 0,
1006 'html' => [
1007 'type' => 'CheckBox',
1008 ],
1009 'add' => '1.7',
1010 ],
1011 'financial_type_id' => [
1012 'name' => 'financial_type_id',
1013 'type' => CRM_Utils_Type::T_INT,
1014 'title' => ts('Financial Type'),
1015 'description' => ts('Financial type assigned to paid event registrations for this event. Required if is_monetary is true.'),
1016 'where' => 'civicrm_event.financial_type_id',
1017 'default' => NULL,
1018 'table_name' => 'civicrm_event',
1019 'entity' => 'Event',
1020 'bao' => 'CRM_Event_BAO_Event',
1021 'localizable' => 0,
1022 'html' => [
1023 'type' => 'Select',
1024 ],
1025 'pseudoconstant' => [
1026 'table' => 'civicrm_financial_type',
1027 'keyColumn' => 'id',
1028 'labelColumn' => 'name',
1029 ],
1030 'add' => '4.3',
1031 ],
1032 'payment_processor' => [
1033 'name' => 'payment_processor',
1034 'type' => CRM_Utils_Type::T_STRING,
1035 'title' => ts('Payment Processor'),
1036 'description' => ts('Payment Processors configured for this Event (if is_monetary is true)'),
1037 'maxlength' => 128,
1038 'size' => CRM_Utils_Type::HUGE,
1039 'where' => 'civicrm_event.payment_processor',
1040 'table_name' => 'civicrm_event',
1041 'entity' => 'Event',
1042 'bao' => 'CRM_Event_BAO_Event',
1043 'localizable' => 0,
1044 'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED,
1045 'html' => [
1046 'type' => 'Select',
1047 'label' => ts("Payment Processors"),
1048 ],
1049 'pseudoconstant' => [
1050 'table' => 'civicrm_payment_processor',
1051 'keyColumn' => 'id',
1052 'labelColumn' => 'name',
1053 ],
1054 'add' => '1.8',
1055 ],
1056 'is_map' => [
1057 'name' => 'is_map',
1058 'type' => CRM_Utils_Type::T_BOOLEAN,
1059 'title' => ts('Map Enabled'),
1060 'description' => ts('Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?'),
1061 'where' => 'civicrm_event.is_map',
1062 'default' => '0',
1063 'table_name' => 'civicrm_event',
1064 'entity' => 'Event',
1065 'bao' => 'CRM_Event_BAO_Event',
1066 'localizable' => 0,
1067 'html' => [
1068 'type' => 'CheckBox',
1069 ],
1070 'add' => '1.7',
1071 ],
1072 'is_active' => [
1073 'name' => 'is_active',
1074 'type' => CRM_Utils_Type::T_BOOLEAN,
1075 'title' => ts('Is Active'),
1076 'description' => ts('Is this Event enabled or disabled/cancelled?'),
1077 'where' => 'civicrm_event.is_active',
1078 'default' => '0',
1079 'table_name' => 'civicrm_event',
1080 'entity' => 'Event',
1081 'bao' => 'CRM_Event_BAO_Event',
1082 'localizable' => 0,
1083 'html' => [
1084 'type' => 'CheckBox',
1085 ],
1086 'add' => '1.7',
1087 ],
1088 'fee_label' => [
1089 'name' => 'fee_label',
1090 'type' => CRM_Utils_Type::T_STRING,
1091 'title' => ts('Fee Label'),
1092 'maxlength' => 255,
1093 'size' => CRM_Utils_Type::HUGE,
1094 'import' => TRUE,
1095 'where' => 'civicrm_event.fee_label',
1096 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
1097 'export' => TRUE,
1098 'table_name' => 'civicrm_event',
1099 'entity' => 'Event',
1100 'bao' => 'CRM_Event_BAO_Event',
1101 'localizable' => 1,
1102 'html' => [
1103 'type' => 'Text',
1104 ],
1105 'add' => '1.8',
1106 ],
1107 'is_show_location' => [
1108 'name' => 'is_show_location',
1109 'type' => CRM_Utils_Type::T_BOOLEAN,
1110 'title' => ts('show location'),
1111 'description' => ts('If true, show event location.'),
1112 'where' => 'civicrm_event.is_show_location',
1113 'default' => '1',
1114 'table_name' => 'civicrm_event',
1115 'entity' => 'Event',
1116 'bao' => 'CRM_Event_BAO_Event',
1117 'localizable' => 0,
1118 'html' => [
1119 'type' => 'CheckBox',
1120 ],
1121 'add' => '1.7',
1122 ],
1123 'loc_block_id' => [
1124 'name' => 'loc_block_id',
1125 'type' => CRM_Utils_Type::T_INT,
1126 'title' => ts('Location Block ID'),
1127 'description' => ts('FK to Location Block ID'),
1128 'where' => 'civicrm_event.loc_block_id',
1129 'table_name' => 'civicrm_event',
1130 'entity' => 'Event',
1131 'bao' => 'CRM_Event_BAO_Event',
1132 'localizable' => 0,
1133 'FKClassName' => 'CRM_Core_DAO_LocBlock',
1134 'html' => [
1135 'label' => ts("Location Block"),
1136 ],
1137 'add' => '2.0',
1138 ],
1139 'default_role_id' => [
1140 'name' => 'default_role_id',
1141 'type' => CRM_Utils_Type::T_INT,
1142 'title' => ts('Default Role'),
1143 'description' => ts('Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.'),
1144 'import' => TRUE,
1145 'where' => 'civicrm_event.default_role_id',
1146 'export' => TRUE,
1147 'default' => '1',
1148 'table_name' => 'civicrm_event',
1149 'entity' => 'Event',
1150 'bao' => 'CRM_Event_BAO_Event',
1151 'localizable' => 0,
1152 'html' => [
1153 'type' => 'Select',
1154 ],
1155 'pseudoconstant' => [
1156 'optionGroupName' => 'participant_role',
1157 'optionEditPath' => 'civicrm/admin/options/participant_role',
1158 ],
1159 'add' => '2.0',
1160 ],
1161 'intro_text' => [
1162 'name' => 'intro_text',
1163 'type' => CRM_Utils_Type::T_TEXT,
1164 'title' => ts('Introductory Message'),
1165 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
1166 'rows' => 6,
1167 'cols' => 50,
1168 'where' => 'civicrm_event.intro_text',
1169 'table_name' => 'civicrm_event',
1170 'entity' => 'Event',
1171 'bao' => 'CRM_Event_BAO_Event',
1172 'localizable' => 1,
1173 'html' => [
1174 'type' => 'RichTextEditor',
1175 ],
1176 'add' => '1.7',
1177 ],
1178 'footer_text' => [
1179 'name' => 'footer_text',
1180 'type' => CRM_Utils_Type::T_TEXT,
1181 'title' => ts('Footer Message'),
1182 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
1183 'rows' => 6,
1184 'cols' => 50,
1185 'where' => 'civicrm_event.footer_text',
1186 'table_name' => 'civicrm_event',
1187 'entity' => 'Event',
1188 'bao' => 'CRM_Event_BAO_Event',
1189 'localizable' => 1,
1190 'html' => [
1191 'type' => 'RichTextEditor',
1192 ],
1193 'add' => '1.7',
1194 ],
1195 'confirm_title' => [
1196 'name' => 'confirm_title',
1197 'type' => CRM_Utils_Type::T_STRING,
1198 'title' => ts('Confirmation Title'),
1199 'description' => ts('Title for Confirmation page.'),
1200 'maxlength' => 255,
1201 'size' => CRM_Utils_Type::HUGE,
1202 'where' => 'civicrm_event.confirm_title',
1203 'default' => NULL,
1204 'table_name' => 'civicrm_event',
1205 'entity' => 'Event',
1206 'bao' => 'CRM_Event_BAO_Event',
1207 'localizable' => 1,
1208 'html' => [
1209 'type' => 'Text',
1210 ],
1211 'add' => '1.7',
1212 ],
1213 'confirm_text' => [
1214 'name' => 'confirm_text',
1215 'type' => CRM_Utils_Type::T_TEXT,
1216 'title' => ts('Confirm Text'),
1217 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
1218 'rows' => 6,
1219 'cols' => 50,
1220 'where' => 'civicrm_event.confirm_text',
1221 'table_name' => 'civicrm_event',
1222 'entity' => 'Event',
1223 'bao' => 'CRM_Event_BAO_Event',
1224 'localizable' => 1,
1225 'html' => [
1226 'type' => 'RichTextEditor',
1227 ],
1228 'add' => '1.7',
1229 ],
1230 'confirm_footer_text' => [
1231 'name' => 'confirm_footer_text',
1232 'type' => CRM_Utils_Type::T_TEXT,
1233 'title' => ts('Footer Text'),
1234 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
1235 'rows' => 6,
1236 'cols' => 50,
1237 'where' => 'civicrm_event.confirm_footer_text',
1238 'table_name' => 'civicrm_event',
1239 'entity' => 'Event',
1240 'bao' => 'CRM_Event_BAO_Event',
1241 'localizable' => 1,
1242 'html' => [
1243 'type' => 'RichTextEditor',
1244 ],
1245 'add' => '1.7',
1246 ],
1247 'is_email_confirm' => [
1248 'name' => 'is_email_confirm',
1249 'type' => CRM_Utils_Type::T_BOOLEAN,
1250 'title' => ts('Is confirm email'),
1251 'description' => ts('If true, confirmation is automatically emailed to contact on successful registration.'),
1252 'where' => 'civicrm_event.is_email_confirm',
1253 'default' => '0',
1254 'table_name' => 'civicrm_event',
1255 'entity' => 'Event',
1256 'bao' => 'CRM_Event_BAO_Event',
1257 'localizable' => 0,
1258 'html' => [
1259 'type' => 'CheckBox',
1260 ],
1261 'add' => '1.7',
1262 ],
1263 'confirm_email_text' => [
1264 'name' => 'confirm_email_text',
1265 'type' => CRM_Utils_Type::T_TEXT,
1266 'title' => ts('Confirmation Email Text'),
1267 'description' => ts('text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now'),
1268 'rows' => 4,
1269 'cols' => 50,
1270 'where' => 'civicrm_event.confirm_email_text',
1271 'table_name' => 'civicrm_event',
1272 'entity' => 'Event',
1273 'bao' => 'CRM_Event_BAO_Event',
1274 'localizable' => 1,
1275 'html' => [
1276 'type' => 'TextArea',
1277 ],
1278 'add' => '1.7',
1279 ],
1280 'confirm_from_name' => [
1281 'name' => 'confirm_from_name',
1282 'type' => CRM_Utils_Type::T_STRING,
1283 'title' => ts('Confirm From Name'),
1284 'description' => ts('FROM email name used for confirmation emails.'),
1285 'maxlength' => 255,
1286 'size' => CRM_Utils_Type::HUGE,
1287 'where' => 'civicrm_event.confirm_from_name',
1288 'table_name' => 'civicrm_event',
1289 'entity' => 'Event',
1290 'bao' => 'CRM_Event_BAO_Event',
1291 'localizable' => 1,
1292 'html' => [
1293 'type' => 'Text',
1294 ],
1295 'add' => '1.7',
1296 ],
1297 'confirm_from_email' => [
1298 'name' => 'confirm_from_email',
1299 'type' => CRM_Utils_Type::T_STRING,
1300 'title' => ts('Confirm From Email'),
1301 'description' => ts('FROM email address used for confirmation emails.'),
1302 'maxlength' => 255,
1303 'size' => CRM_Utils_Type::HUGE,
1304 'where' => 'civicrm_event.confirm_from_email',
1305 'table_name' => 'civicrm_event',
1306 'entity' => 'Event',
1307 'bao' => 'CRM_Event_BAO_Event',
1308 'localizable' => 0,
1309 'html' => [
1310 'type' => 'Text',
1311 ],
1312 'add' => '1.7',
1313 ],
1314 'cc_confirm' => [
1315 'name' => 'cc_confirm',
1316 'type' => CRM_Utils_Type::T_STRING,
1317 'title' => ts('Cc Confirm'),
1318 'description' => ts('comma-separated list of email addresses to cc each time a confirmation is sent'),
1319 'maxlength' => 255,
1320 'size' => CRM_Utils_Type::HUGE,
1321 'where' => 'civicrm_event.cc_confirm',
1322 'table_name' => 'civicrm_event',
1323 'entity' => 'Event',
1324 'bao' => 'CRM_Event_BAO_Event',
1325 'localizable' => 0,
1326 'html' => [
1327 'type' => 'Text',
1328 'label' => ts("CC Confirm"),
1329 ],
1330 'add' => '1.7',
1331 ],
1332 'bcc_confirm' => [
1333 'name' => 'bcc_confirm',
1334 'type' => CRM_Utils_Type::T_STRING,
1335 'title' => ts('Bcc Confirm'),
1336 'description' => ts('comma-separated list of email addresses to bcc each time a confirmation is sent'),
1337 'maxlength' => 255,
1338 'size' => CRM_Utils_Type::HUGE,
1339 'where' => 'civicrm_event.bcc_confirm',
1340 'table_name' => 'civicrm_event',
1341 'entity' => 'Event',
1342 'bao' => 'CRM_Event_BAO_Event',
1343 'localizable' => 0,
1344 'html' => [
1345 'type' => 'Text',
1346 'label' => ts("BCC Confirm"),
1347 ],
1348 'add' => '1.7',
1349 ],
1350 'default_fee_id' => [
1351 'name' => 'default_fee_id',
1352 'type' => CRM_Utils_Type::T_INT,
1353 'title' => ts('Default Fee ID'),
1354 'description' => ts('FK to civicrm_option_value.'),
1355 'where' => 'civicrm_event.default_fee_id',
1356 'table_name' => 'civicrm_event',
1357 'entity' => 'Event',
1358 'bao' => 'CRM_Event_BAO_Event',
1359 'localizable' => 0,
1360 'add' => '1.7',
1361 ],
1362 'default_discount_fee_id' => [
1363 'name' => 'default_discount_fee_id',
1364 'type' => CRM_Utils_Type::T_INT,
1365 'title' => ts('Default Discount Fee ID'),
1366 'description' => ts('FK to civicrm_option_value.'),
1367 'where' => 'civicrm_event.default_discount_fee_id',
1368 'table_name' => 'civicrm_event',
1369 'entity' => 'Event',
1370 'bao' => 'CRM_Event_BAO_Event',
1371 'localizable' => 0,
1372 'add' => '1.7',
1373 ],
1374 'thankyou_title' => [
1375 'name' => 'thankyou_title',
1376 'type' => CRM_Utils_Type::T_STRING,
1377 'title' => ts('ThankYou Title'),
1378 'description' => ts('Title for ThankYou page.'),
1379 'maxlength' => 255,
1380 'size' => CRM_Utils_Type::HUGE,
1381 'where' => 'civicrm_event.thankyou_title',
1382 'default' => NULL,
1383 'table_name' => 'civicrm_event',
1384 'entity' => 'Event',
1385 'bao' => 'CRM_Event_BAO_Event',
1386 'localizable' => 1,
1387 'html' => [
1388 'type' => 'Text',
1389 ],
1390 'add' => '1.7',
1391 ],
1392 'thankyou_text' => [
1393 'name' => 'thankyou_text',
1394 'type' => CRM_Utils_Type::T_TEXT,
1395 'title' => ts('ThankYou Text'),
1396 'description' => ts('ThankYou Text.'),
1397 'rows' => 6,
1398 'cols' => 50,
1399 'where' => 'civicrm_event.thankyou_text',
1400 'table_name' => 'civicrm_event',
1401 'entity' => 'Event',
1402 'bao' => 'CRM_Event_BAO_Event',
1403 'localizable' => 1,
1404 'html' => [
1405 'type' => 'RichTextEditor',
1406 ],
1407 'add' => '1.7',
1408 ],
1409 'thankyou_footer_text' => [
1410 'name' => 'thankyou_footer_text',
1411 'type' => CRM_Utils_Type::T_TEXT,
1412 'title' => ts('Footer Text'),
1413 'description' => ts('Footer message.'),
1414 'rows' => 6,
1415 'cols' => 50,
1416 'where' => 'civicrm_event.thankyou_footer_text',
1417 'table_name' => 'civicrm_event',
1418 'entity' => 'Event',
1419 'bao' => 'CRM_Event_BAO_Event',
1420 'localizable' => 1,
1421 'html' => [
1422 'type' => 'RichTextEditor',
1423 ],
1424 'add' => '1.7',
1425 ],
1426 'is_pay_later' => [
1427 'name' => 'is_pay_later',
1428 'type' => CRM_Utils_Type::T_BOOLEAN,
1429 'title' => ts('Pay Later Allowed'),
1430 'description' => ts('if true - allows the user to send payment directly to the org later'),
1431 'where' => 'civicrm_event.is_pay_later',
1432 'default' => '0',
1433 'table_name' => 'civicrm_event',
1434 'entity' => 'Event',
1435 'bao' => 'CRM_Event_BAO_Event',
1436 'localizable' => 0,
1437 'html' => [
1438 'type' => 'CheckBox',
1439 ],
1440 'add' => '2.0',
1441 ],
1442 'pay_later_text' => [
1443 'name' => 'pay_later_text',
1444 'type' => CRM_Utils_Type::T_TEXT,
1445 'title' => ts('Pay Later Text'),
1446 'description' => ts('The text displayed to the user in the main form'),
1447 'where' => 'civicrm_event.pay_later_text',
1448 'table_name' => 'civicrm_event',
1449 'entity' => 'Event',
1450 'bao' => 'CRM_Event_BAO_Event',
1451 'localizable' => 1,
1452 'html' => [
1453 'type' => 'RichTextEditor',
1454 ],
1455 'add' => '2.0',
1456 ],
1457 'pay_later_receipt' => [
1458 'name' => 'pay_later_receipt',
1459 'type' => CRM_Utils_Type::T_TEXT,
1460 'title' => ts('Pay Later Receipt Text'),
1461 'description' => ts('The receipt sent to the user instead of the normal receipt text'),
1462 'where' => 'civicrm_event.pay_later_receipt',
1463 'table_name' => 'civicrm_event',
1464 'entity' => 'Event',
1465 'bao' => 'CRM_Event_BAO_Event',
1466 'localizable' => 1,
1467 'html' => [
1468 'type' => 'Text',
1469 ],
1470 'add' => '2.0',
1471 ],
1472 'is_partial_payment' => [
1473 'name' => 'is_partial_payment',
1474 'type' => CRM_Utils_Type::T_BOOLEAN,
1475 'title' => ts('Partial Payments Enabled'),
1476 'description' => ts('is partial payment enabled for this event'),
1477 'where' => 'civicrm_event.is_partial_payment',
1478 'default' => '0',
1479 'table_name' => 'civicrm_event',
1480 'entity' => 'Event',
1481 'bao' => 'CRM_Event_BAO_Event',
1482 'localizable' => 0,
1483 'html' => [
1484 'type' => 'CheckBox',
1485 ],
1486 'add' => '4.3',
1487 ],
1488 'initial_amount_label' => [
1489 'name' => 'initial_amount_label',
1490 'type' => CRM_Utils_Type::T_STRING,
1491 'title' => ts('Initial Amount Label'),
1492 'description' => ts('Initial amount label for partial payment'),
1493 'maxlength' => 255,
1494 'size' => CRM_Utils_Type::HUGE,
1495 'where' => 'civicrm_event.initial_amount_label',
1496 'table_name' => 'civicrm_event',
1497 'entity' => 'Event',
1498 'bao' => 'CRM_Event_BAO_Event',
1499 'localizable' => 1,
1500 'html' => [
1501 'type' => 'Text',
1502 ],
1503 'add' => '4.3',
1504 ],
1505 'initial_amount_help_text' => [
1506 'name' => 'initial_amount_help_text',
1507 'type' => CRM_Utils_Type::T_TEXT,
1508 'title' => ts('Initial Amount Help Text'),
1509 'description' => ts('Initial amount help text for partial payment'),
1510 'where' => 'civicrm_event.initial_amount_help_text',
1511 'table_name' => 'civicrm_event',
1512 'entity' => 'Event',
1513 'bao' => 'CRM_Event_BAO_Event',
1514 'localizable' => 1,
1515 'html' => [
1516 'type' => 'Text',
1517 ],
1518 'add' => '4.3',
1519 ],
1520 'min_initial_amount' => [
1521 'name' => 'min_initial_amount',
1522 'type' => CRM_Utils_Type::T_MONEY,
1523 'title' => ts('Minimum Initial Amount'),
1524 'description' => ts('Minimum initial amount for partial payment'),
1525 'precision' => [
1526 20,
1527 2,
1528 ],
1529 'where' => 'civicrm_event.min_initial_amount',
1530 'table_name' => 'civicrm_event',
1531 'entity' => 'Event',
1532 'bao' => 'CRM_Event_BAO_Event',
1533 'localizable' => 0,
1534 'html' => [
1535 'type' => 'Text',
1536 ],
1537 'add' => '4.3',
1538 ],
1539 'is_multiple_registrations' => [
1540 'name' => 'is_multiple_registrations',
1541 'type' => CRM_Utils_Type::T_BOOLEAN,
1542 'title' => ts('Allow Multiple Registrations'),
1543 'description' => ts('if true - allows the user to register multiple participants for event'),
1544 'where' => 'civicrm_event.is_multiple_registrations',
1545 'default' => '0',
1546 'table_name' => 'civicrm_event',
1547 'entity' => 'Event',
1548 'bao' => 'CRM_Event_BAO_Event',
1549 'localizable' => 0,
1550 'html' => [
1551 'type' => 'CheckBox',
1552 ],
1553 'add' => '2.1',
1554 ],
1555 'max_additional_participants' => [
1556 'name' => 'max_additional_participants',
1557 'type' => CRM_Utils_Type::T_INT,
1558 'title' => ts('Maximum number of additional participants per registration'),
1559 'description' => ts('Maximum number of additional participants that can be registered on a single booking'),
1560 'where' => 'civicrm_event.max_additional_participants',
1561 'default' => '0',
1562 'table_name' => 'civicrm_event',
1563 'entity' => 'Event',
1564 'bao' => 'CRM_Event_BAO_Event',
1565 'localizable' => 0,
1566 'add' => '4.7',
1567 ],
1568 'allow_same_participant_emails' => [
1569 'name' => 'allow_same_participant_emails',
1570 'type' => CRM_Utils_Type::T_BOOLEAN,
1571 'title' => ts('Does Event allow multiple registrations from same email address?'),
1572 'description' => ts('if true - allows the user to register multiple registrations from same email address.'),
1573 'where' => 'civicrm_event.allow_same_participant_emails',
1574 'default' => '0',
1575 'table_name' => 'civicrm_event',
1576 'entity' => 'Event',
1577 'bao' => 'CRM_Event_BAO_Event',
1578 'localizable' => 0,
1579 'html' => [
1580 'type' => 'CheckBox',
1581 ],
1582 'add' => '2.2',
1583 ],
1584 'has_waitlist' => [
1585 'name' => 'has_waitlist',
1586 'type' => CRM_Utils_Type::T_BOOLEAN,
1587 'title' => ts('Waitlist Enabled'),
1588 'description' => ts('Whether the event has waitlist support.'),
1589 'where' => 'civicrm_event.has_waitlist',
1590 'table_name' => 'civicrm_event',
1591 'entity' => 'Event',
1592 'bao' => 'CRM_Event_BAO_Event',
1593 'localizable' => 0,
1594 'html' => [
1595 'type' => 'CheckBox',
1596 ],
1597 'add' => '3.0',
1598 ],
1599 'requires_approval' => [
1600 'name' => 'requires_approval',
1601 'type' => CRM_Utils_Type::T_BOOLEAN,
1602 'title' => ts('Requires Approval'),
1603 'description' => ts('Whether participants require approval before they can finish registering.'),
1604 'where' => 'civicrm_event.requires_approval',
1605 'table_name' => 'civicrm_event',
1606 'entity' => 'Event',
1607 'bao' => 'CRM_Event_BAO_Event',
1608 'localizable' => 0,
1609 'html' => [
1610 'type' => 'CheckBox',
1611 'label' => ts("Requires Approval"),
1612 ],
1613 'add' => '3.0',
1614 ],
1615 'expiration_time' => [
1616 'name' => 'expiration_time',
1617 'type' => CRM_Utils_Type::T_INT,
1618 'title' => ts('Expiration Time'),
1619 'description' => ts('Expire pending but unconfirmed registrations after this many hours.'),
1620 'where' => 'civicrm_event.expiration_time',
1621 'table_name' => 'civicrm_event',
1622 'entity' => 'Event',
1623 'bao' => 'CRM_Event_BAO_Event',
1624 'localizable' => 0,
1625 'html' => [
1626 'type' => 'Text',
1627 'label' => ts("Expiration Time"),
1628 ],
1629 'add' => '3.0',
1630 ],
1631 'allow_selfcancelxfer' => [
1632 'name' => 'allow_selfcancelxfer',
1633 'type' => CRM_Utils_Type::T_BOOLEAN,
1634 'title' => ts('Allow Self-service Cancellation or Transfer'),
1635 'description' => ts('Allow self service cancellation or transfer for event?'),
1636 'where' => 'civicrm_event.allow_selfcancelxfer',
1637 'default' => '0',
1638 'table_name' => 'civicrm_event',
1639 'entity' => 'Event',
1640 'bao' => 'CRM_Event_BAO_Event',
1641 'localizable' => 0,
1642 'html' => [
1643 'type' => 'CheckBox',
1644 ],
1645 'add' => '4.7',
1646 ],
1647 'selfcancelxfer_time' => [
1648 'name' => 'selfcancelxfer_time',
1649 'type' => CRM_Utils_Type::T_INT,
1650 'title' => ts('Self-service Cancellation or Transfer Time'),
1651 'description' => ts('Number of hours prior to event start date to allow self-service cancellation or transfer.'),
1652 'where' => 'civicrm_event.selfcancelxfer_time',
1653 'default' => '0',
1654 'table_name' => 'civicrm_event',
1655 'entity' => 'Event',
1656 'bao' => 'CRM_Event_BAO_Event',
1657 'localizable' => 0,
1658 'html' => [
1659 'type' => 'Text',
1660 ],
1661 'add' => '4.7',
1662 ],
1663 'waitlist_text' => [
1664 'name' => 'waitlist_text',
1665 'type' => CRM_Utils_Type::T_TEXT,
1666 'title' => ts('Waitlist Text'),
1667 'description' => ts('Text to display when the event is full, but participants can signup for a waitlist.'),
1668 'rows' => 4,
1669 'cols' => 60,
1670 'where' => 'civicrm_event.waitlist_text',
1671 'table_name' => 'civicrm_event',
1672 'entity' => 'Event',
1673 'bao' => 'CRM_Event_BAO_Event',
1674 'localizable' => 1,
1675 'html' => [
1676 'type' => 'TextArea',
1677 'label' => ts("Waitlist Text"),
1678 ],
1679 'add' => '3.0',
1680 ],
1681 'approval_req_text' => [
1682 'name' => 'approval_req_text',
1683 'type' => CRM_Utils_Type::T_TEXT,
1684 'title' => ts('Approval Req Text'),
1685 'description' => ts('Text to display when the approval is required to complete registration for an event.'),
1686 'rows' => 4,
1687 'cols' => 60,
1688 'where' => 'civicrm_event.approval_req_text',
1689 'table_name' => 'civicrm_event',
1690 'entity' => 'Event',
1691 'bao' => 'CRM_Event_BAO_Event',
1692 'localizable' => 1,
1693 'html' => [
1694 'type' => 'TextArea',
1695 'label' => ts("Approval Required Text"),
1696 ],
1697 'add' => '3.0',
1698 ],
1699 'is_template' => [
1700 'name' => 'is_template',
1701 'type' => CRM_Utils_Type::T_BOOLEAN,
1702 'title' => ts('Is an Event Template'),
1703 'description' => ts('whether the event has template'),
1704 'required' => TRUE,
1705 'where' => 'civicrm_event.is_template',
1706 'default' => '0',
1707 'table_name' => 'civicrm_event',
1708 'entity' => 'Event',
1709 'bao' => 'CRM_Event_BAO_Event',
1710 'localizable' => 0,
1711 'html' => [
1712 'type' => 'CheckBox',
1713 ],
1714 'add' => '3.0',
1715 ],
1716 'template_title' => [
1717 'name' => 'template_title',
1718 'type' => CRM_Utils_Type::T_STRING,
1719 'title' => ts('Event Template Title'),
1720 'description' => ts('Event Template Title'),
1721 'maxlength' => 255,
1722 'size' => CRM_Utils_Type::HUGE,
1723 'import' => TRUE,
1724 'where' => 'civicrm_event.template_title',
1725 'headerPattern' => '/(template.)?title$/i',
1726 'export' => TRUE,
1727 'table_name' => 'civicrm_event',
1728 'entity' => 'Event',
1729 'bao' => 'CRM_Event_BAO_Event',
1730 'localizable' => 1,
1731 'html' => [
1732 'type' => 'Text',
1733 ],
1734 'add' => '3.0',
1735 ],
1736 'created_id' => [
1737 'name' => 'created_id',
1738 'type' => CRM_Utils_Type::T_INT,
1739 'title' => ts('Created By Contact ID'),
1740 'description' => ts('FK to civicrm_contact, who created this event'),
1741 'where' => 'civicrm_event.created_id',
1742 'table_name' => 'civicrm_event',
1743 'entity' => 'Event',
1744 'bao' => 'CRM_Event_BAO_Event',
1745 'localizable' => 0,
1746 'FKClassName' => 'CRM_Contact_DAO_Contact',
1747 'html' => [
1748 'label' => ts("Created By"),
1749 ],
1750 'add' => '3.0',
1751 ],
1752 'created_date' => [
1753 'name' => 'created_date',
1754 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
1755 'title' => ts('Event Created Date'),
1756 'description' => ts('Date and time that event was created.'),
1757 'where' => 'civicrm_event.created_date',
1758 'table_name' => 'civicrm_event',
1759 'entity' => 'Event',
1760 'bao' => 'CRM_Event_BAO_Event',
1761 'localizable' => 0,
1762 'add' => '3.0',
1763 ],
1764 'currency' => [
1765 'name' => 'currency',
1766 'type' => CRM_Utils_Type::T_STRING,
1767 'title' => ts('Currency'),
1768 'description' => ts('3 character string, value from config setting or input via user.'),
1769 'maxlength' => 3,
1770 'size' => CRM_Utils_Type::FOUR,
1771 'import' => TRUE,
1772 'where' => 'civicrm_event.currency',
1773 'headerPattern' => '/cur(rency)?/i',
1774 'dataPattern' => '/^[A-Z]{3}$/i',
1775 'export' => TRUE,
1776 'table_name' => 'civicrm_event',
1777 'entity' => 'Event',
1778 'bao' => 'CRM_Event_BAO_Event',
1779 'localizable' => 0,
1780 'html' => [
1781 'type' => 'Select',
1782 'label' => ts("Currency"),
1783 ],
1784 'pseudoconstant' => [
1785 'table' => 'civicrm_currency',
1786 'keyColumn' => 'name',
1787 'labelColumn' => 'full_name',
1788 'nameColumn' => 'name',
1789 'abbrColumn' => 'symbol',
1790 ],
1791 'add' => '3.3',
1792 ],
1793 'campaign_id' => [
1794 'name' => 'campaign_id',
1795 'type' => CRM_Utils_Type::T_INT,
1796 'title' => ts('Campaign ID'),
1797 'description' => ts('The campaign for which this event has been created.'),
1798 'where' => 'civicrm_event.campaign_id',
1799 'table_name' => 'civicrm_event',
1800 'entity' => 'Event',
1801 'bao' => 'CRM_Event_BAO_Event',
1802 'localizable' => 0,
1803 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1804 'component' => 'CiviCampaign',
1805 'html' => [
1806 'type' => 'EntityRef',
1807 'label' => ts("Campaign"),
1808 ],
1809 'pseudoconstant' => [
1810 'table' => 'civicrm_campaign',
1811 'keyColumn' => 'id',
1812 'labelColumn' => 'title',
1813 'prefetch' => 'FALSE',
1814 ],
1815 'add' => '3.4',
1816 ],
1817 'is_share' => [
1818 'name' => 'is_share',
1819 'type' => CRM_Utils_Type::T_BOOLEAN,
1820 'title' => ts('Is shared through social media'),
1821 'description' => ts('Can people share the event through social media?'),
1822 'where' => 'civicrm_event.is_share',
1823 'default' => '1',
1824 'table_name' => 'civicrm_event',
1825 'entity' => 'Event',
1826 'bao' => 'CRM_Event_BAO_Event',
1827 'localizable' => 0,
1828 'html' => [
1829 'type' => 'CheckBox',
1830 ],
1831 'add' => '4.1',
1832 ],
1833 'is_confirm_enabled' => [
1834 'name' => 'is_confirm_enabled',
1835 'type' => CRM_Utils_Type::T_BOOLEAN,
1836 'title' => ts('Is the booking confirmation screen enabled?'),
1837 'description' => ts('If false, the event booking confirmation screen gets skipped'),
1838 'where' => 'civicrm_event.is_confirm_enabled',
1839 'default' => '1',
1840 'table_name' => 'civicrm_event',
1841 'entity' => 'Event',
1842 'bao' => 'CRM_Event_BAO_Event',
1843 'localizable' => 0,
1844 'html' => [
1845 'type' => 'CheckBox',
1846 ],
1847 'add' => '4.5',
1848 ],
1849 'parent_event_id' => [
1850 'name' => 'parent_event_id',
1851 'type' => CRM_Utils_Type::T_INT,
1852 'title' => ts('Parent Event ID'),
1853 'description' => ts('Implicit FK to civicrm_event: parent event'),
1854 'where' => 'civicrm_event.parent_event_id',
1855 'default' => NULL,
1856 'table_name' => 'civicrm_event',
1857 'entity' => 'Event',
1858 'bao' => 'CRM_Event_BAO_Event',
1859 'localizable' => 0,
1860 'html' => [
1861 'type' => 'EntityRef',
1862 ],
1863 'add' => '4.1',
1864 ],
1865 'slot_label_id' => [
1866 'name' => 'slot_label_id',
1867 'type' => CRM_Utils_Type::T_INT,
1868 'title' => ts('Subevent Slot Label ID'),
1869 'description' => ts('Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.'),
1870 'where' => 'civicrm_event.slot_label_id',
1871 'default' => NULL,
1872 'table_name' => 'civicrm_event',
1873 'entity' => 'Event',
1874 'bao' => 'CRM_Event_BAO_Event',
1875 'localizable' => 0,
1876 'html' => [
1877 'type' => 'Select',
1878 ],
1879 'add' => '4.1',
1880 ],
1881 'dedupe_rule_group_id' => [
1882 'name' => 'dedupe_rule_group_id',
1883 'type' => CRM_Utils_Type::T_INT,
1884 'title' => ts('Dedupe Rule ID'),
1885 'description' => ts('Rule to use when matching registrations for this event'),
1886 'where' => 'civicrm_event.dedupe_rule_group_id',
1887 'default' => NULL,
1888 'table_name' => 'civicrm_event',
1889 'entity' => 'Event',
1890 'bao' => 'CRM_Event_BAO_Event',
1891 'localizable' => 0,
1892 'FKClassName' => 'CRM_Dedupe_DAO_DedupeRuleGroup',
1893 'html' => [
1894 'type' => 'Select',
1895 'label' => ts("Dedupe Rule"),
1896 ],
1897 'pseudoconstant' => [
1898 'table' => 'civicrm_dedupe_rule_group',
1899 'keyColumn' => 'id',
1900 'labelColumn' => 'title',
1901 'nameColumn' => 'name',
1902 ],
1903 'add' => '4.5',
1904 ],
1905 'is_billing_required' => [
1906 'name' => 'is_billing_required',
1907 'type' => CRM_Utils_Type::T_BOOLEAN,
1908 'title' => ts('Is billing block required'),
1909 'description' => ts('if true than billing block is required this event'),
1910 'where' => 'civicrm_event.is_billing_required',
1911 'default' => '0',
1912 'table_name' => 'civicrm_event',
1913 'entity' => 'Event',
1914 'bao' => 'CRM_Event_BAO_Event',
1915 'localizable' => 0,
1916 'html' => [
1917 'type' => 'CheckBox',
1918 ],
1919 'add' => '4.6',
1920 ],
1921 ];
1922 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
1923 }
1924 return Civi::$statics[__CLASS__]['fields'];
1925 }
1926
1927 /**
1928 * Return a mapping from field-name to the corresponding key (as used in fields()).
1929 *
1930 * @return array
1931 * Array(string $name => string $uniqueName).
1932 */
1933 public static function &fieldKeys() {
1934 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
1935 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
1936 }
1937 return Civi::$statics[__CLASS__]['fieldKeys'];
1938 }
1939
1940 /**
1941 * Returns the names of this table
1942 *
1943 * @return string
1944 */
1945 public static function getTableName() {
1946 return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
1947 }
1948
1949 /**
1950 * Returns if this table needs to be logged
1951 *
1952 * @return bool
1953 */
1954 public function getLog() {
1955 return self::$_log;
1956 }
1957
1958 /**
1959 * Returns the list of fields that can be imported
1960 *
1961 * @param bool $prefix
1962 *
1963 * @return array
1964 */
1965 public static function &import($prefix = FALSE) {
1966 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'event', $prefix, []);
1967 return $r;
1968 }
1969
1970 /**
1971 * Returns the list of fields that can be exported
1972 *
1973 * @param bool $prefix
1974 *
1975 * @return array
1976 */
1977 public static function &export($prefix = FALSE) {
1978 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'event', $prefix, []);
1979 return $r;
1980 }
1981
1982 /**
1983 * Returns the list of indices
1984 *
1985 * @param bool $localize
1986 *
1987 * @return array
1988 */
1989 public static function indices($localize = TRUE) {
1990 $indices = [
1991 'index_event_type_id' => [
1992 'name' => 'index_event_type_id',
1993 'field' => [
1994 0 => 'event_type_id',
1995 ],
1996 'localizable' => FALSE,
1997 'sig' => 'civicrm_event::0::event_type_id',
1998 ],
1999 'index_participant_listing_id' => [
2000 'name' => 'index_participant_listing_id',
2001 'field' => [
2002 0 => 'participant_listing_id',
2003 ],
2004 'localizable' => FALSE,
2005 'sig' => 'civicrm_event::0::participant_listing_id',
2006 ],
2007 'index_parent_event_id' => [
2008 'name' => 'index_parent_event_id',
2009 'field' => [
2010 0 => 'parent_event_id',
2011 ],
2012 'localizable' => FALSE,
2013 'sig' => 'civicrm_event::0::parent_event_id',
2014 ],
2015 ];
2016 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
2017 }
2018
2019 }