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