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