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