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