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