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