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