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