Merge pull request #17742 from MiyaNoctem/dev-core-1854-fix-resetting-overridden...
[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:82ba48cbb804cf6f4b26fa50f07d44db)
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 public static function getEntityTitle() {
533 return ts('Events');
534 }
535
536 /**
537 * Returns foreign keys and entity references.
538 *
539 * @return array
540 * [CRM_Core_Reference_Interface]
541 */
542 public static function getReferenceColumns() {
543 if (!isset(Civi::$statics[__CLASS__]['links'])) {
544 Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
545 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'loc_block_id', 'civicrm_loc_block', 'id');
546 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'created_id', 'civicrm_contact', 'id');
547 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
548 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'dedupe_rule_group_id', 'civicrm_dedupe_rule_group', 'id');
549 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
550 }
551 return Civi::$statics[__CLASS__]['links'];
552 }
553
554 /**
555 * Returns all the column names of this table
556 *
557 * @return array
558 */
559 public static function &fields() {
560 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
561 Civi::$statics[__CLASS__]['fields'] = [
562 'id' => [
563 'name' => 'id',
564 'type' => CRM_Utils_Type::T_INT,
565 'title' => ts('Event ID'),
566 'description' => ts('Event'),
567 'required' => TRUE,
568 'where' => 'civicrm_event.id',
569 'table_name' => 'civicrm_event',
570 'entity' => 'Event',
571 'bao' => 'CRM_Event_BAO_Event',
572 'localizable' => 0,
573 'add' => '1.7',
574 ],
575 'event_title' => [
576 'name' => 'title',
577 'type' => CRM_Utils_Type::T_STRING,
578 'title' => ts('Event Title'),
579 'description' => ts('Event Title (e.g. Fall Fundraiser Dinner)'),
580 'maxlength' => 255,
581 'size' => CRM_Utils_Type::HUGE,
582 'import' => TRUE,
583 'where' => 'civicrm_event.title',
584 'headerPattern' => '/(event.)?title$/i',
585 'export' => TRUE,
586 'table_name' => 'civicrm_event',
587 'entity' => 'Event',
588 'bao' => 'CRM_Event_BAO_Event',
589 'localizable' => 1,
590 'html' => [
591 'type' => 'Text',
592 ],
593 'add' => '1.7',
594 ],
595 'summary' => [
596 'name' => 'summary',
597 'type' => CRM_Utils_Type::T_TEXT,
598 'title' => ts('Event Summary'),
599 '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.'),
600 'rows' => 4,
601 'cols' => 60,
602 'where' => 'civicrm_event.summary',
603 'table_name' => 'civicrm_event',
604 'entity' => 'Event',
605 'bao' => 'CRM_Event_BAO_Event',
606 'localizable' => 1,
607 'html' => [
608 'type' => 'TextArea',
609 ],
610 'add' => '1.7',
611 ],
612 'event_description' => [
613 'name' => 'description',
614 'type' => CRM_Utils_Type::T_TEXT,
615 'title' => ts('Event Description'),
616 'description' => ts('Full description of event. Text and html allowed. Displayed on built-in Event Information screens.'),
617 'rows' => 8,
618 'cols' => 60,
619 'where' => 'civicrm_event.description',
620 'table_name' => 'civicrm_event',
621 'entity' => 'Event',
622 'bao' => 'CRM_Event_BAO_Event',
623 'localizable' => 1,
624 'html' => [
625 'type' => 'RichTextEditor',
626 ],
627 'add' => '1.7',
628 ],
629 'event_type_id' => [
630 'name' => 'event_type_id',
631 'type' => CRM_Utils_Type::T_INT,
632 'title' => ts('Event Type'),
633 'description' => ts('Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.'),
634 'where' => 'civicrm_event.event_type_id',
635 'default' => '0',
636 'table_name' => 'civicrm_event',
637 'entity' => 'Event',
638 'bao' => 'CRM_Event_BAO_Event',
639 'localizable' => 0,
640 'html' => [
641 'type' => 'Select',
642 ],
643 'pseudoconstant' => [
644 'optionGroupName' => 'event_type',
645 'optionEditPath' => 'civicrm/admin/options/event_type',
646 ],
647 'add' => '1.7',
648 ],
649 'participant_listing_id' => [
650 'name' => 'participant_listing_id',
651 'type' => CRM_Utils_Type::T_INT,
652 'title' => ts('Participant Listing'),
653 'description' => ts('Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.'),
654 'where' => 'civicrm_event.participant_listing_id',
655 'default' => 'NULL',
656 'table_name' => 'civicrm_event',
657 'entity' => 'Event',
658 'bao' => 'CRM_Event_BAO_Event',
659 'localizable' => 0,
660 'html' => [
661 'type' => 'Select',
662 ],
663 'pseudoconstant' => [
664 'optionGroupName' => 'participant_listing',
665 'optionEditPath' => 'civicrm/admin/options/participant_listing',
666 ],
667 'add' => '2.0',
668 ],
669 'is_public' => [
670 'name' => 'is_public',
671 'type' => CRM_Utils_Type::T_BOOLEAN,
672 'title' => ts('Is Event Public'),
673 'description' => ts('Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.'),
674 'where' => 'civicrm_event.is_public',
675 'default' => '1',
676 'table_name' => 'civicrm_event',
677 'entity' => 'Event',
678 'bao' => 'CRM_Event_BAO_Event',
679 'localizable' => 0,
680 'html' => [
681 'type' => 'CheckBox',
682 ],
683 'add' => '1.7',
684 ],
685 'event_start_date' => [
686 'name' => 'start_date',
687 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
688 'title' => ts('Event Start Date'),
689 'description' => ts('Date and time that event starts.'),
690 'import' => TRUE,
691 'where' => 'civicrm_event.start_date',
692 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
693 'export' => TRUE,
694 'table_name' => 'civicrm_event',
695 'entity' => 'Event',
696 'bao' => 'CRM_Event_BAO_Event',
697 'localizable' => 0,
698 'html' => [
699 'type' => 'Select Date',
700 'formatType' => 'activityDateTime',
701 ],
702 'add' => '1.7',
703 ],
704 'event_end_date' => [
705 'name' => 'end_date',
706 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
707 'title' => ts('Event End Date'),
708 'description' => ts('Date and time that event ends. May be NULL if no defined end date/time'),
709 'import' => TRUE,
710 'where' => 'civicrm_event.end_date',
711 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
712 'export' => TRUE,
713 'table_name' => 'civicrm_event',
714 'entity' => 'Event',
715 'bao' => 'CRM_Event_BAO_Event',
716 'localizable' => 0,
717 'html' => [
718 'type' => 'Select Date',
719 'formatType' => 'activityDateTime',
720 ],
721 'add' => '1.7',
722 ],
723 'is_online_registration' => [
724 'name' => 'is_online_registration',
725 'type' => CRM_Utils_Type::T_BOOLEAN,
726 'title' => ts('Is Online Registration'),
727 'description' => ts('If true, include registration link on Event Info page.'),
728 'where' => 'civicrm_event.is_online_registration',
729 'default' => '0',
730 'table_name' => 'civicrm_event',
731 'entity' => 'Event',
732 'bao' => 'CRM_Event_BAO_Event',
733 'localizable' => 0,
734 'html' => [
735 'type' => 'CheckBox',
736 ],
737 'add' => '1.7',
738 ],
739 'registration_link_text' => [
740 'name' => 'registration_link_text',
741 'type' => CRM_Utils_Type::T_STRING,
742 'title' => ts('Event Registration Link Text'),
743 'description' => ts('Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.'),
744 'maxlength' => 255,
745 'size' => CRM_Utils_Type::HUGE,
746 'where' => 'civicrm_event.registration_link_text',
747 'table_name' => 'civicrm_event',
748 'entity' => 'Event',
749 'bao' => 'CRM_Event_BAO_Event',
750 'localizable' => 1,
751 'html' => [
752 'type' => 'Text',
753 ],
754 'add' => '1.7',
755 ],
756 'registration_start_date' => [
757 'name' => 'registration_start_date',
758 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
759 'title' => ts('Registration Start Date'),
760 'description' => ts('Date and time that online registration starts.'),
761 'where' => 'civicrm_event.registration_start_date',
762 'table_name' => 'civicrm_event',
763 'entity' => 'Event',
764 'bao' => 'CRM_Event_BAO_Event',
765 'localizable' => 0,
766 'html' => [
767 'type' => 'Select Date',
768 'formatType' => 'activityDateTime',
769 ],
770 'add' => '1.8',
771 ],
772 'registration_end_date' => [
773 'name' => 'registration_end_date',
774 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
775 'title' => ts('Registration End Date'),
776 'description' => ts('Date and time that online registration ends.'),
777 'where' => 'civicrm_event.registration_end_date',
778 'table_name' => 'civicrm_event',
779 'entity' => 'Event',
780 'bao' => 'CRM_Event_BAO_Event',
781 'localizable' => 0,
782 'html' => [
783 'type' => 'Select Date',
784 'formatType' => 'activityDateTime',
785 ],
786 'add' => '1.8',
787 ],
788 'max_participants' => [
789 'name' => 'max_participants',
790 'type' => CRM_Utils_Type::T_INT,
791 'title' => ts('Max Participants'),
792 '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.'),
793 'where' => 'civicrm_event.max_participants',
794 'default' => 'NULL',
795 'table_name' => 'civicrm_event',
796 'entity' => 'Event',
797 'bao' => 'CRM_Event_BAO_Event',
798 'localizable' => 0,
799 'html' => [
800 'type' => 'Text',
801 ],
802 'add' => '1.7',
803 ],
804 'event_full_text' => [
805 'name' => 'event_full_text',
806 'type' => CRM_Utils_Type::T_TEXT,
807 'title' => ts('Event Information'),
808 '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.'),
809 'rows' => 4,
810 'cols' => 60,
811 'where' => 'civicrm_event.event_full_text',
812 'table_name' => 'civicrm_event',
813 'entity' => 'Event',
814 'bao' => 'CRM_Event_BAO_Event',
815 'localizable' => 1,
816 'html' => [
817 'type' => 'TextArea',
818 ],
819 'add' => '1.7',
820 ],
821 'is_monetary' => [
822 'name' => 'is_monetary',
823 'type' => CRM_Utils_Type::T_BOOLEAN,
824 'title' => ts('Is this a PAID event?'),
825 'description' => ts('If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.'),
826 'where' => 'civicrm_event.is_monetary',
827 'default' => '0',
828 'table_name' => 'civicrm_event',
829 'entity' => 'Event',
830 'bao' => 'CRM_Event_BAO_Event',
831 'localizable' => 0,
832 'html' => [
833 'type' => 'CheckBox',
834 ],
835 'add' => '1.7',
836 ],
837 'financial_type_id' => [
838 'name' => 'financial_type_id',
839 'type' => CRM_Utils_Type::T_INT,
840 'title' => ts('Financial Type'),
841 'description' => ts('Financial type assigned to paid event registrations for this event. Required if is_monetary is true.'),
842 'where' => 'civicrm_event.financial_type_id',
843 'default' => 'NULL',
844 'table_name' => 'civicrm_event',
845 'entity' => 'Event',
846 'bao' => 'CRM_Event_BAO_Event',
847 'localizable' => 0,
848 'html' => [
849 'type' => 'Select',
850 ],
851 'pseudoconstant' => [
852 'table' => 'civicrm_financial_type',
853 'keyColumn' => 'id',
854 'labelColumn' => 'name',
855 ],
856 'add' => '4.3',
857 ],
858 'payment_processor' => [
859 'name' => 'payment_processor',
860 'type' => CRM_Utils_Type::T_STRING,
861 'title' => ts('Payment Processor'),
862 'description' => ts('Payment Processors configured for this Event (if is_monetary is true)'),
863 'maxlength' => 128,
864 'size' => CRM_Utils_Type::HUGE,
865 'where' => 'civicrm_event.payment_processor',
866 'table_name' => 'civicrm_event',
867 'entity' => 'Event',
868 'bao' => 'CRM_Event_BAO_Event',
869 'localizable' => 0,
870 'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED,
871 'html' => [
872 'type' => 'Select',
873 ],
874 'pseudoconstant' => [
875 'table' => 'civicrm_payment_processor',
876 'keyColumn' => 'id',
877 'labelColumn' => 'name',
878 ],
879 'add' => '1.8',
880 ],
881 'is_map' => [
882 'name' => 'is_map',
883 'type' => CRM_Utils_Type::T_BOOLEAN,
884 'title' => ts('Map Enabled'),
885 'description' => ts('Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?'),
886 'where' => 'civicrm_event.is_map',
887 'default' => '0',
888 'table_name' => 'civicrm_event',
889 'entity' => 'Event',
890 'bao' => 'CRM_Event_BAO_Event',
891 'localizable' => 0,
892 'html' => [
893 'type' => 'CheckBox',
894 ],
895 'add' => '1.7',
896 ],
897 'is_active' => [
898 'name' => 'is_active',
899 'type' => CRM_Utils_Type::T_BOOLEAN,
900 'title' => ts('Is Active'),
901 'description' => ts('Is this Event enabled or disabled/cancelled?'),
902 'where' => 'civicrm_event.is_active',
903 'default' => '0',
904 'table_name' => 'civicrm_event',
905 'entity' => 'Event',
906 'bao' => 'CRM_Event_BAO_Event',
907 'localizable' => 0,
908 'html' => [
909 'type' => 'CheckBox',
910 ],
911 'add' => '1.7',
912 ],
913 'fee_label' => [
914 'name' => 'fee_label',
915 'type' => CRM_Utils_Type::T_STRING,
916 'title' => ts('Fee Label'),
917 'maxlength' => 255,
918 'size' => CRM_Utils_Type::HUGE,
919 'import' => TRUE,
920 'where' => 'civicrm_event.fee_label',
921 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
922 'export' => TRUE,
923 'table_name' => 'civicrm_event',
924 'entity' => 'Event',
925 'bao' => 'CRM_Event_BAO_Event',
926 'localizable' => 1,
927 'html' => [
928 'type' => 'Text',
929 ],
930 'add' => '1.8',
931 ],
932 'is_show_location' => [
933 'name' => 'is_show_location',
934 'type' => CRM_Utils_Type::T_BOOLEAN,
935 'title' => ts('show location'),
936 'description' => ts('If true, show event location.'),
937 'where' => 'civicrm_event.is_show_location',
938 'default' => '1',
939 'table_name' => 'civicrm_event',
940 'entity' => 'Event',
941 'bao' => 'CRM_Event_BAO_Event',
942 'localizable' => 0,
943 'html' => [
944 'type' => 'CheckBox',
945 ],
946 'add' => '1.7',
947 ],
948 'loc_block_id' => [
949 'name' => 'loc_block_id',
950 'type' => CRM_Utils_Type::T_INT,
951 'title' => ts('Location Block ID'),
952 'description' => ts('FK to Location Block ID'),
953 'where' => 'civicrm_event.loc_block_id',
954 'table_name' => 'civicrm_event',
955 'entity' => 'Event',
956 'bao' => 'CRM_Event_BAO_Event',
957 'localizable' => 0,
958 'FKClassName' => 'CRM_Core_DAO_LocBlock',
959 'add' => '2.0',
960 ],
961 'default_role_id' => [
962 'name' => 'default_role_id',
963 'type' => CRM_Utils_Type::T_INT,
964 'title' => ts('Default Role'),
965 'description' => ts('Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.'),
966 'import' => TRUE,
967 'where' => 'civicrm_event.default_role_id',
968 'export' => TRUE,
969 'default' => '1',
970 'table_name' => 'civicrm_event',
971 'entity' => 'Event',
972 'bao' => 'CRM_Event_BAO_Event',
973 'localizable' => 0,
974 'html' => [
975 'type' => 'Select',
976 ],
977 'pseudoconstant' => [
978 'optionGroupName' => 'participant_role',
979 'optionEditPath' => 'civicrm/admin/options/participant_role',
980 ],
981 'add' => '2.0',
982 ],
983 'intro_text' => [
984 'name' => 'intro_text',
985 'type' => CRM_Utils_Type::T_TEXT,
986 'title' => ts('Introductory Message'),
987 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
988 'rows' => 6,
989 'cols' => 50,
990 'where' => 'civicrm_event.intro_text',
991 'table_name' => 'civicrm_event',
992 'entity' => 'Event',
993 'bao' => 'CRM_Event_BAO_Event',
994 'localizable' => 1,
995 'html' => [
996 'type' => 'RichTextEditor',
997 ],
998 'add' => '1.7',
999 ],
1000 'footer_text' => [
1001 'name' => 'footer_text',
1002 'type' => CRM_Utils_Type::T_TEXT,
1003 'title' => ts('Footer Message'),
1004 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
1005 'rows' => 6,
1006 'cols' => 50,
1007 'where' => 'civicrm_event.footer_text',
1008 'table_name' => 'civicrm_event',
1009 'entity' => 'Event',
1010 'bao' => 'CRM_Event_BAO_Event',
1011 'localizable' => 1,
1012 'html' => [
1013 'type' => 'RichTextEditor',
1014 ],
1015 'add' => '1.7',
1016 ],
1017 'confirm_title' => [
1018 'name' => 'confirm_title',
1019 'type' => CRM_Utils_Type::T_STRING,
1020 'title' => ts('Confirmation Title'),
1021 'description' => ts('Title for Confirmation page.'),
1022 'maxlength' => 255,
1023 'size' => CRM_Utils_Type::HUGE,
1024 'where' => 'civicrm_event.confirm_title',
1025 'default' => 'NULL',
1026 'table_name' => 'civicrm_event',
1027 'entity' => 'Event',
1028 'bao' => 'CRM_Event_BAO_Event',
1029 'localizable' => 1,
1030 'html' => [
1031 'type' => 'Text',
1032 ],
1033 'add' => '1.7',
1034 ],
1035 'confirm_text' => [
1036 'name' => 'confirm_text',
1037 'type' => CRM_Utils_Type::T_TEXT,
1038 'title' => ts('Confirm Text'),
1039 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
1040 'rows' => 6,
1041 'cols' => 50,
1042 'where' => 'civicrm_event.confirm_text',
1043 'table_name' => 'civicrm_event',
1044 'entity' => 'Event',
1045 'bao' => 'CRM_Event_BAO_Event',
1046 'localizable' => 1,
1047 'html' => [
1048 'type' => 'RichTextEditor',
1049 ],
1050 'add' => '1.7',
1051 ],
1052 'confirm_footer_text' => [
1053 'name' => 'confirm_footer_text',
1054 'type' => CRM_Utils_Type::T_TEXT,
1055 'title' => ts('Footer Text'),
1056 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
1057 'rows' => 6,
1058 'cols' => 50,
1059 'where' => 'civicrm_event.confirm_footer_text',
1060 'table_name' => 'civicrm_event',
1061 'entity' => 'Event',
1062 'bao' => 'CRM_Event_BAO_Event',
1063 'localizable' => 1,
1064 'html' => [
1065 'type' => 'RichTextEditor',
1066 ],
1067 'add' => '1.7',
1068 ],
1069 'is_email_confirm' => [
1070 'name' => 'is_email_confirm',
1071 'type' => CRM_Utils_Type::T_BOOLEAN,
1072 'title' => ts('Is confirm email'),
1073 'description' => ts('If true, confirmation is automatically emailed to contact on successful registration.'),
1074 'where' => 'civicrm_event.is_email_confirm',
1075 'default' => '0',
1076 'table_name' => 'civicrm_event',
1077 'entity' => 'Event',
1078 'bao' => 'CRM_Event_BAO_Event',
1079 'localizable' => 0,
1080 'html' => [
1081 'type' => 'CheckBox',
1082 ],
1083 'add' => '1.7',
1084 ],
1085 'confirm_email_text' => [
1086 'name' => 'confirm_email_text',
1087 'type' => CRM_Utils_Type::T_TEXT,
1088 'title' => ts('Confirmation Email Text'),
1089 'description' => ts('text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now'),
1090 'rows' => 4,
1091 'cols' => 50,
1092 'where' => 'civicrm_event.confirm_email_text',
1093 'table_name' => 'civicrm_event',
1094 'entity' => 'Event',
1095 'bao' => 'CRM_Event_BAO_Event',
1096 'localizable' => 1,
1097 'html' => [
1098 'type' => 'TextArea',
1099 ],
1100 'add' => '1.7',
1101 ],
1102 'confirm_from_name' => [
1103 'name' => 'confirm_from_name',
1104 'type' => CRM_Utils_Type::T_STRING,
1105 'title' => ts('Confirm From Name'),
1106 'description' => ts('FROM email name used for confirmation emails.'),
1107 'maxlength' => 255,
1108 'size' => CRM_Utils_Type::HUGE,
1109 'where' => 'civicrm_event.confirm_from_name',
1110 'table_name' => 'civicrm_event',
1111 'entity' => 'Event',
1112 'bao' => 'CRM_Event_BAO_Event',
1113 'localizable' => 1,
1114 'html' => [
1115 'type' => 'Text',
1116 ],
1117 'add' => '1.7',
1118 ],
1119 'confirm_from_email' => [
1120 'name' => 'confirm_from_email',
1121 'type' => CRM_Utils_Type::T_STRING,
1122 'title' => ts('Confirm From Email'),
1123 'description' => ts('FROM email address used for confirmation emails.'),
1124 'maxlength' => 255,
1125 'size' => CRM_Utils_Type::HUGE,
1126 'where' => 'civicrm_event.confirm_from_email',
1127 'table_name' => 'civicrm_event',
1128 'entity' => 'Event',
1129 'bao' => 'CRM_Event_BAO_Event',
1130 'localizable' => 0,
1131 'html' => [
1132 'type' => 'Text',
1133 ],
1134 'add' => '1.7',
1135 ],
1136 'cc_confirm' => [
1137 'name' => 'cc_confirm',
1138 'type' => CRM_Utils_Type::T_STRING,
1139 'title' => ts('Cc Confirm'),
1140 'description' => ts('comma-separated list of email addresses to cc each time a confirmation is sent'),
1141 'maxlength' => 255,
1142 'size' => CRM_Utils_Type::HUGE,
1143 'where' => 'civicrm_event.cc_confirm',
1144 'table_name' => 'civicrm_event',
1145 'entity' => 'Event',
1146 'bao' => 'CRM_Event_BAO_Event',
1147 'localizable' => 0,
1148 'html' => [
1149 'type' => 'Text',
1150 ],
1151 'add' => '1.7',
1152 ],
1153 'bcc_confirm' => [
1154 'name' => 'bcc_confirm',
1155 'type' => CRM_Utils_Type::T_STRING,
1156 'title' => ts('Bcc Confirm'),
1157 'description' => ts('comma-separated list of email addresses to bcc each time a confirmation is sent'),
1158 'maxlength' => 255,
1159 'size' => CRM_Utils_Type::HUGE,
1160 'where' => 'civicrm_event.bcc_confirm',
1161 'table_name' => 'civicrm_event',
1162 'entity' => 'Event',
1163 'bao' => 'CRM_Event_BAO_Event',
1164 'localizable' => 0,
1165 'html' => [
1166 'type' => 'Text',
1167 ],
1168 'add' => '1.7',
1169 ],
1170 'default_fee_id' => [
1171 'name' => 'default_fee_id',
1172 'type' => CRM_Utils_Type::T_INT,
1173 'title' => ts('Default Fee ID'),
1174 'description' => ts('FK to civicrm_option_value.'),
1175 'where' => 'civicrm_event.default_fee_id',
1176 'table_name' => 'civicrm_event',
1177 'entity' => 'Event',
1178 'bao' => 'CRM_Event_BAO_Event',
1179 'localizable' => 0,
1180 'add' => '1.7',
1181 ],
1182 'default_discount_fee_id' => [
1183 'name' => 'default_discount_fee_id',
1184 'type' => CRM_Utils_Type::T_INT,
1185 'title' => ts('Default Discount Fee ID'),
1186 'description' => ts('FK to civicrm_option_value.'),
1187 'where' => 'civicrm_event.default_discount_fee_id',
1188 'table_name' => 'civicrm_event',
1189 'entity' => 'Event',
1190 'bao' => 'CRM_Event_BAO_Event',
1191 'localizable' => 0,
1192 'add' => '1.7',
1193 ],
1194 'thankyou_title' => [
1195 'name' => 'thankyou_title',
1196 'type' => CRM_Utils_Type::T_STRING,
1197 'title' => ts('ThankYou Title'),
1198 'description' => ts('Title for ThankYou page.'),
1199 'maxlength' => 255,
1200 'size' => CRM_Utils_Type::HUGE,
1201 'where' => 'civicrm_event.thankyou_title',
1202 'default' => 'NULL',
1203 'table_name' => 'civicrm_event',
1204 'entity' => 'Event',
1205 'bao' => 'CRM_Event_BAO_Event',
1206 'localizable' => 1,
1207 'html' => [
1208 'type' => 'Text',
1209 ],
1210 'add' => '1.7',
1211 ],
1212 'thankyou_text' => [
1213 'name' => 'thankyou_text',
1214 'type' => CRM_Utils_Type::T_TEXT,
1215 'title' => ts('ThankYou Text'),
1216 'description' => ts('ThankYou Text.'),
1217 'rows' => 6,
1218 'cols' => 50,
1219 'where' => 'civicrm_event.thankyou_text',
1220 'table_name' => 'civicrm_event',
1221 'entity' => 'Event',
1222 'bao' => 'CRM_Event_BAO_Event',
1223 'localizable' => 1,
1224 'html' => [
1225 'type' => 'RichTextEditor',
1226 ],
1227 'add' => '1.7',
1228 ],
1229 'thankyou_footer_text' => [
1230 'name' => 'thankyou_footer_text',
1231 'type' => CRM_Utils_Type::T_TEXT,
1232 'title' => ts('Footer Text'),
1233 'description' => ts('Footer message.'),
1234 'rows' => 6,
1235 'cols' => 50,
1236 'where' => 'civicrm_event.thankyou_footer_text',
1237 'table_name' => 'civicrm_event',
1238 'entity' => 'Event',
1239 'bao' => 'CRM_Event_BAO_Event',
1240 'localizable' => 1,
1241 'html' => [
1242 'type' => 'RichTextEditor',
1243 ],
1244 'add' => '1.7',
1245 ],
1246 'is_pay_later' => [
1247 'name' => 'is_pay_later',
1248 'type' => CRM_Utils_Type::T_BOOLEAN,
1249 'title' => ts('Pay Later Allowed'),
1250 'description' => ts('if true - allows the user to send payment directly to the org later'),
1251 'where' => 'civicrm_event.is_pay_later',
1252 'default' => '0',
1253 'table_name' => 'civicrm_event',
1254 'entity' => 'Event',
1255 'bao' => 'CRM_Event_BAO_Event',
1256 'localizable' => 0,
1257 'html' => [
1258 'type' => 'CheckBox',
1259 ],
1260 'add' => '2.0',
1261 ],
1262 'pay_later_text' => [
1263 'name' => 'pay_later_text',
1264 'type' => CRM_Utils_Type::T_TEXT,
1265 'title' => ts('Pay Later Text'),
1266 'description' => ts('The text displayed to the user in the main form'),
1267 'where' => 'civicrm_event.pay_later_text',
1268 'table_name' => 'civicrm_event',
1269 'entity' => 'Event',
1270 'bao' => 'CRM_Event_BAO_Event',
1271 'localizable' => 1,
1272 'html' => [
1273 'type' => 'RichTextEditor',
1274 ],
1275 'add' => '2.0',
1276 ],
1277 'pay_later_receipt' => [
1278 'name' => 'pay_later_receipt',
1279 'type' => CRM_Utils_Type::T_TEXT,
1280 'title' => ts('Pay Later Receipt Text'),
1281 'description' => ts('The receipt sent to the user instead of the normal receipt text'),
1282 'where' => 'civicrm_event.pay_later_receipt',
1283 'table_name' => 'civicrm_event',
1284 'entity' => 'Event',
1285 'bao' => 'CRM_Event_BAO_Event',
1286 'localizable' => 1,
1287 'html' => [
1288 'type' => 'Text',
1289 ],
1290 'add' => '2.0',
1291 ],
1292 'is_partial_payment' => [
1293 'name' => 'is_partial_payment',
1294 'type' => CRM_Utils_Type::T_BOOLEAN,
1295 'title' => ts('Partial Payments Enabled'),
1296 'description' => ts('is partial payment enabled for this event'),
1297 'where' => 'civicrm_event.is_partial_payment',
1298 'default' => '0',
1299 'table_name' => 'civicrm_event',
1300 'entity' => 'Event',
1301 'bao' => 'CRM_Event_BAO_Event',
1302 'localizable' => 0,
1303 'html' => [
1304 'type' => 'CheckBox',
1305 ],
1306 'add' => '4.3',
1307 ],
1308 'initial_amount_label' => [
1309 'name' => 'initial_amount_label',
1310 'type' => CRM_Utils_Type::T_STRING,
1311 'title' => ts('Initial Amount Label'),
1312 'description' => ts('Initial amount label for partial payment'),
1313 'maxlength' => 255,
1314 'size' => CRM_Utils_Type::HUGE,
1315 'where' => 'civicrm_event.initial_amount_label',
1316 'table_name' => 'civicrm_event',
1317 'entity' => 'Event',
1318 'bao' => 'CRM_Event_BAO_Event',
1319 'localizable' => 1,
1320 'html' => [
1321 'type' => 'Text',
1322 ],
1323 'add' => '4.3',
1324 ],
1325 'initial_amount_help_text' => [
1326 'name' => 'initial_amount_help_text',
1327 'type' => CRM_Utils_Type::T_TEXT,
1328 'title' => ts('Initial Amount Help Text'),
1329 'description' => ts('Initial amount help text for partial payment'),
1330 'where' => 'civicrm_event.initial_amount_help_text',
1331 'table_name' => 'civicrm_event',
1332 'entity' => 'Event',
1333 'bao' => 'CRM_Event_BAO_Event',
1334 'localizable' => 1,
1335 'html' => [
1336 'type' => 'Text',
1337 ],
1338 'add' => '4.3',
1339 ],
1340 'min_initial_amount' => [
1341 'name' => 'min_initial_amount',
1342 'type' => CRM_Utils_Type::T_MONEY,
1343 'title' => ts('Minimum Initial Amount'),
1344 'description' => ts('Minimum initial amount for partial payment'),
1345 'precision' => [
1346 20,
1347 2,
1348 ],
1349 'where' => 'civicrm_event.min_initial_amount',
1350 'table_name' => 'civicrm_event',
1351 'entity' => 'Event',
1352 'bao' => 'CRM_Event_BAO_Event',
1353 'localizable' => 0,
1354 'html' => [
1355 'type' => 'Text',
1356 ],
1357 'add' => '4.3',
1358 ],
1359 'is_multiple_registrations' => [
1360 'name' => 'is_multiple_registrations',
1361 'type' => CRM_Utils_Type::T_BOOLEAN,
1362 'title' => ts('Allow Multiple Registrations'),
1363 'description' => ts('if true - allows the user to register multiple participants for event'),
1364 'where' => 'civicrm_event.is_multiple_registrations',
1365 'default' => '0',
1366 'table_name' => 'civicrm_event',
1367 'entity' => 'Event',
1368 'bao' => 'CRM_Event_BAO_Event',
1369 'localizable' => 0,
1370 'html' => [
1371 'type' => 'CheckBox',
1372 ],
1373 'add' => '2.1',
1374 ],
1375 'max_additional_participants' => [
1376 'name' => 'max_additional_participants',
1377 'type' => CRM_Utils_Type::T_INT,
1378 'title' => ts('Maximum number of additional participants per registration'),
1379 'description' => ts('Maximum number of additional participants that can be registered on a single booking'),
1380 'where' => 'civicrm_event.max_additional_participants',
1381 'default' => '0',
1382 'table_name' => 'civicrm_event',
1383 'entity' => 'Event',
1384 'bao' => 'CRM_Event_BAO_Event',
1385 'localizable' => 0,
1386 'add' => '4.7',
1387 ],
1388 'allow_same_participant_emails' => [
1389 'name' => 'allow_same_participant_emails',
1390 'type' => CRM_Utils_Type::T_BOOLEAN,
1391 'title' => ts('Does Event allow multiple registrations from same email address?'),
1392 'description' => ts('if true - allows the user to register multiple registrations from same email address.'),
1393 'where' => 'civicrm_event.allow_same_participant_emails',
1394 'default' => '0',
1395 'table_name' => 'civicrm_event',
1396 'entity' => 'Event',
1397 'bao' => 'CRM_Event_BAO_Event',
1398 'localizable' => 0,
1399 'html' => [
1400 'type' => 'CheckBox',
1401 ],
1402 'add' => '2.2',
1403 ],
1404 'has_waitlist' => [
1405 'name' => 'has_waitlist',
1406 'type' => CRM_Utils_Type::T_BOOLEAN,
1407 'title' => ts('Waitlist Enabled'),
1408 'description' => ts('Whether the event has waitlist support.'),
1409 'where' => 'civicrm_event.has_waitlist',
1410 'table_name' => 'civicrm_event',
1411 'entity' => 'Event',
1412 'bao' => 'CRM_Event_BAO_Event',
1413 'localizable' => 0,
1414 'html' => [
1415 'type' => 'CheckBox',
1416 ],
1417 'add' => '3.0',
1418 ],
1419 'requires_approval' => [
1420 'name' => 'requires_approval',
1421 'type' => CRM_Utils_Type::T_BOOLEAN,
1422 'title' => ts('Requires Approval'),
1423 'description' => ts('Whether participants require approval before they can finish registering.'),
1424 'where' => 'civicrm_event.requires_approval',
1425 'table_name' => 'civicrm_event',
1426 'entity' => 'Event',
1427 'bao' => 'CRM_Event_BAO_Event',
1428 'localizable' => 0,
1429 'html' => [
1430 'type' => 'CheckBox',
1431 ],
1432 'add' => '3.0',
1433 ],
1434 'expiration_time' => [
1435 'name' => 'expiration_time',
1436 'type' => CRM_Utils_Type::T_INT,
1437 'title' => ts('Expiration Time'),
1438 'description' => ts('Expire pending but unconfirmed registrations after this many hours.'),
1439 'where' => 'civicrm_event.expiration_time',
1440 'table_name' => 'civicrm_event',
1441 'entity' => 'Event',
1442 'bao' => 'CRM_Event_BAO_Event',
1443 'localizable' => 0,
1444 'html' => [
1445 'type' => 'Text',
1446 ],
1447 'add' => '3.0',
1448 ],
1449 'allow_selfcancelxfer' => [
1450 'name' => 'allow_selfcancelxfer',
1451 'type' => CRM_Utils_Type::T_BOOLEAN,
1452 'title' => ts('Allow Self-service Cancellation or Transfer'),
1453 'description' => ts('Allow self service cancellation or transfer for event?'),
1454 'where' => 'civicrm_event.allow_selfcancelxfer',
1455 'default' => '0',
1456 'table_name' => 'civicrm_event',
1457 'entity' => 'Event',
1458 'bao' => 'CRM_Event_BAO_Event',
1459 'localizable' => 0,
1460 'html' => [
1461 'type' => 'CheckBox',
1462 ],
1463 'add' => '4.7',
1464 ],
1465 'selfcancelxfer_time' => [
1466 'name' => 'selfcancelxfer_time',
1467 'type' => CRM_Utils_Type::T_INT,
1468 'title' => ts('Self-service Cancellation or Transfer Time'),
1469 'description' => ts('Number of hours prior to event start date to allow self-service cancellation or transfer.'),
1470 'where' => 'civicrm_event.selfcancelxfer_time',
1471 'default' => '0',
1472 'table_name' => 'civicrm_event',
1473 'entity' => 'Event',
1474 'bao' => 'CRM_Event_BAO_Event',
1475 'localizable' => 0,
1476 'html' => [
1477 'type' => 'Text',
1478 ],
1479 'add' => '4.7',
1480 ],
1481 'waitlist_text' => [
1482 'name' => 'waitlist_text',
1483 'type' => CRM_Utils_Type::T_TEXT,
1484 'title' => ts('Waitlist Text'),
1485 'description' => ts('Text to display when the event is full, but participants can signup for a waitlist.'),
1486 'rows' => 4,
1487 'cols' => 60,
1488 'where' => 'civicrm_event.waitlist_text',
1489 'table_name' => 'civicrm_event',
1490 'entity' => 'Event',
1491 'bao' => 'CRM_Event_BAO_Event',
1492 'localizable' => 1,
1493 'html' => [
1494 'type' => 'TextArea',
1495 ],
1496 'add' => '3.0',
1497 ],
1498 'approval_req_text' => [
1499 'name' => 'approval_req_text',
1500 'type' => CRM_Utils_Type::T_TEXT,
1501 'title' => ts('Approval Req Text'),
1502 'description' => ts('Text to display when the approval is required to complete registration for an event.'),
1503 'rows' => 4,
1504 'cols' => 60,
1505 'where' => 'civicrm_event.approval_req_text',
1506 'table_name' => 'civicrm_event',
1507 'entity' => 'Event',
1508 'bao' => 'CRM_Event_BAO_Event',
1509 'localizable' => 1,
1510 'html' => [
1511 'type' => 'TextArea',
1512 ],
1513 'add' => '3.0',
1514 ],
1515 'is_template' => [
1516 'name' => 'is_template',
1517 'type' => CRM_Utils_Type::T_BOOLEAN,
1518 'title' => ts('Is an Event Template'),
1519 'description' => ts('whether the event has template'),
1520 'required' => TRUE,
1521 'where' => 'civicrm_event.is_template',
1522 'default' => '0',
1523 'table_name' => 'civicrm_event',
1524 'entity' => 'Event',
1525 'bao' => 'CRM_Event_BAO_Event',
1526 'localizable' => 0,
1527 'html' => [
1528 'type' => 'CheckBox',
1529 ],
1530 'add' => '3.0',
1531 ],
1532 'template_title' => [
1533 'name' => 'template_title',
1534 'type' => CRM_Utils_Type::T_STRING,
1535 'title' => ts('Event Template Title'),
1536 'description' => ts('Event Template Title'),
1537 'maxlength' => 255,
1538 'size' => CRM_Utils_Type::HUGE,
1539 'import' => TRUE,
1540 'where' => 'civicrm_event.template_title',
1541 'headerPattern' => '/(template.)?title$/i',
1542 'export' => TRUE,
1543 'table_name' => 'civicrm_event',
1544 'entity' => 'Event',
1545 'bao' => 'CRM_Event_BAO_Event',
1546 'localizable' => 1,
1547 'html' => [
1548 'type' => 'Text',
1549 ],
1550 'add' => '3.0',
1551 ],
1552 'created_id' => [
1553 'name' => 'created_id',
1554 'type' => CRM_Utils_Type::T_INT,
1555 'title' => ts('Created By Contact ID'),
1556 'description' => ts('FK to civicrm_contact, who created this event'),
1557 'where' => 'civicrm_event.created_id',
1558 'table_name' => 'civicrm_event',
1559 'entity' => 'Event',
1560 'bao' => 'CRM_Event_BAO_Event',
1561 'localizable' => 0,
1562 'FKClassName' => 'CRM_Contact_DAO_Contact',
1563 'add' => '3.0',
1564 ],
1565 'created_date' => [
1566 'name' => 'created_date',
1567 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
1568 'title' => ts('Event Created Date'),
1569 'description' => ts('Date and time that event was created.'),
1570 'where' => 'civicrm_event.created_date',
1571 'table_name' => 'civicrm_event',
1572 'entity' => 'Event',
1573 'bao' => 'CRM_Event_BAO_Event',
1574 'localizable' => 0,
1575 'add' => '3.0',
1576 ],
1577 'currency' => [
1578 'name' => 'currency',
1579 'type' => CRM_Utils_Type::T_STRING,
1580 'title' => ts('Currency'),
1581 'description' => ts('3 character string, value from config setting or input via user.'),
1582 'maxlength' => 3,
1583 'size' => CRM_Utils_Type::FOUR,
1584 'import' => TRUE,
1585 'where' => 'civicrm_event.currency',
1586 'headerPattern' => '/cur(rency)?/i',
1587 'dataPattern' => '/^[A-Z]{3}$/i',
1588 'export' => TRUE,
1589 'table_name' => 'civicrm_event',
1590 'entity' => 'Event',
1591 'bao' => 'CRM_Event_BAO_Event',
1592 'localizable' => 0,
1593 'html' => [
1594 'type' => 'Select',
1595 ],
1596 'pseudoconstant' => [
1597 'table' => 'civicrm_currency',
1598 'keyColumn' => 'name',
1599 'labelColumn' => 'full_name',
1600 'nameColumn' => 'name',
1601 'abbrColumn' => 'symbol',
1602 ],
1603 'add' => '3.3',
1604 ],
1605 'campaign_id' => [
1606 'name' => 'campaign_id',
1607 'type' => CRM_Utils_Type::T_INT,
1608 'title' => ts('Campaign'),
1609 'description' => ts('The campaign for which this event has been created.'),
1610 'where' => 'civicrm_event.campaign_id',
1611 'table_name' => 'civicrm_event',
1612 'entity' => 'Event',
1613 'bao' => 'CRM_Event_BAO_Event',
1614 'localizable' => 0,
1615 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1616 'html' => [
1617 'type' => 'EntityRef',
1618 ],
1619 'pseudoconstant' => [
1620 'table' => 'civicrm_campaign',
1621 'keyColumn' => 'id',
1622 'labelColumn' => 'title',
1623 ],
1624 'add' => '3.4',
1625 ],
1626 'is_share' => [
1627 'name' => 'is_share',
1628 'type' => CRM_Utils_Type::T_BOOLEAN,
1629 'title' => ts('Is shared through social media'),
1630 'description' => ts('Can people share the event through social media?'),
1631 'where' => 'civicrm_event.is_share',
1632 'default' => '1',
1633 'table_name' => 'civicrm_event',
1634 'entity' => 'Event',
1635 'bao' => 'CRM_Event_BAO_Event',
1636 'localizable' => 0,
1637 'html' => [
1638 'type' => 'CheckBox',
1639 ],
1640 'add' => '4.1',
1641 ],
1642 'is_confirm_enabled' => [
1643 'name' => 'is_confirm_enabled',
1644 'type' => CRM_Utils_Type::T_BOOLEAN,
1645 'title' => ts('Is the booking confirmation screen enabled?'),
1646 'description' => ts('If false, the event booking confirmation screen gets skipped'),
1647 'where' => 'civicrm_event.is_confirm_enabled',
1648 'default' => '1',
1649 'table_name' => 'civicrm_event',
1650 'entity' => 'Event',
1651 'bao' => 'CRM_Event_BAO_Event',
1652 'localizable' => 0,
1653 'html' => [
1654 'type' => 'CheckBox',
1655 ],
1656 'add' => '4.5',
1657 ],
1658 'parent_event_id' => [
1659 'name' => 'parent_event_id',
1660 'type' => CRM_Utils_Type::T_INT,
1661 'title' => ts('Parent Event ID'),
1662 'description' => ts('Implicit FK to civicrm_event: parent event'),
1663 'where' => 'civicrm_event.parent_event_id',
1664 'default' => 'NULL',
1665 'table_name' => 'civicrm_event',
1666 'entity' => 'Event',
1667 'bao' => 'CRM_Event_BAO_Event',
1668 'localizable' => 0,
1669 'html' => [
1670 'type' => 'EntityRef',
1671 ],
1672 'add' => '4.1',
1673 ],
1674 'slot_label_id' => [
1675 'name' => 'slot_label_id',
1676 'type' => CRM_Utils_Type::T_INT,
1677 'title' => ts('Subevent Slot Label ID'),
1678 'description' => ts('Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.'),
1679 'where' => 'civicrm_event.slot_label_id',
1680 'default' => 'NULL',
1681 'table_name' => 'civicrm_event',
1682 'entity' => 'Event',
1683 'bao' => 'CRM_Event_BAO_Event',
1684 'localizable' => 0,
1685 'html' => [
1686 'type' => 'Select',
1687 ],
1688 'add' => '4.1',
1689 ],
1690 'dedupe_rule_group_id' => [
1691 'name' => 'dedupe_rule_group_id',
1692 'type' => CRM_Utils_Type::T_INT,
1693 'title' => ts('Dedupe Rule'),
1694 'description' => ts('Rule to use when matching registrations for this event'),
1695 'where' => 'civicrm_event.dedupe_rule_group_id',
1696 'default' => 'NULL',
1697 'table_name' => 'civicrm_event',
1698 'entity' => 'Event',
1699 'bao' => 'CRM_Event_BAO_Event',
1700 'localizable' => 0,
1701 'FKClassName' => 'CRM_Dedupe_DAO_RuleGroup',
1702 'html' => [
1703 'type' => 'Select',
1704 ],
1705 'pseudoconstant' => [
1706 'table' => 'civicrm_dedupe_rule_group',
1707 'keyColumn' => 'id',
1708 'labelColumn' => 'title',
1709 'nameColumn' => 'name',
1710 ],
1711 'add' => '4.5',
1712 ],
1713 'is_billing_required' => [
1714 'name' => 'is_billing_required',
1715 'type' => CRM_Utils_Type::T_BOOLEAN,
1716 'title' => ts('Is billing block required'),
1717 'description' => ts('if true than billing block is required this event'),
1718 'where' => 'civicrm_event.is_billing_required',
1719 'default' => '0',
1720 'table_name' => 'civicrm_event',
1721 'entity' => 'Event',
1722 'bao' => 'CRM_Event_BAO_Event',
1723 'localizable' => 0,
1724 'html' => [
1725 'type' => 'CheckBox',
1726 ],
1727 'add' => '4.6',
1728 ],
1729 ];
1730 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
1731 }
1732 return Civi::$statics[__CLASS__]['fields'];
1733 }
1734
1735 /**
1736 * Return a mapping from field-name to the corresponding key (as used in fields()).
1737 *
1738 * @return array
1739 * Array(string $name => string $uniqueName).
1740 */
1741 public static function &fieldKeys() {
1742 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
1743 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
1744 }
1745 return Civi::$statics[__CLASS__]['fieldKeys'];
1746 }
1747
1748 /**
1749 * Returns the names of this table
1750 *
1751 * @return string
1752 */
1753 public static function getTableName() {
1754 return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
1755 }
1756
1757 /**
1758 * Returns if this table needs to be logged
1759 *
1760 * @return bool
1761 */
1762 public function getLog() {
1763 return self::$_log;
1764 }
1765
1766 /**
1767 * Returns the list of fields that can be imported
1768 *
1769 * @param bool $prefix
1770 *
1771 * @return array
1772 */
1773 public static function &import($prefix = FALSE) {
1774 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'event', $prefix, []);
1775 return $r;
1776 }
1777
1778 /**
1779 * Returns the list of fields that can be exported
1780 *
1781 * @param bool $prefix
1782 *
1783 * @return array
1784 */
1785 public static function &export($prefix = FALSE) {
1786 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'event', $prefix, []);
1787 return $r;
1788 }
1789
1790 /**
1791 * Returns the list of indices
1792 *
1793 * @param bool $localize
1794 *
1795 * @return array
1796 */
1797 public static function indices($localize = TRUE) {
1798 $indices = [
1799 'index_event_type_id' => [
1800 'name' => 'index_event_type_id',
1801 'field' => [
1802 0 => 'event_type_id',
1803 ],
1804 'localizable' => FALSE,
1805 'sig' => 'civicrm_event::0::event_type_id',
1806 ],
1807 'index_participant_listing_id' => [
1808 'name' => 'index_participant_listing_id',
1809 'field' => [
1810 0 => 'participant_listing_id',
1811 ],
1812 'localizable' => FALSE,
1813 'sig' => 'civicrm_event::0::participant_listing_id',
1814 ],
1815 'index_parent_event_id' => [
1816 'name' => 'index_parent_event_id',
1817 'field' => [
1818 0 => 'parent_event_id',
1819 ],
1820 'localizable' => FALSE,
1821 'sig' => 'civicrm_event::0::parent_event_id',
1822 ],
1823 ];
1824 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
1825 }
1826
1827 }