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