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