Merge pull request #20093 from larssandergreen/mailings-AB-test-improvements
[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
bccecebc 9 * (GenCodeChecksum:d9ea1f641de04dabb54616ef4edfe88c)
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 *
28979d65
CW
115 * @var bool|string|null
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 *
28979d65
CW
142 * @var bool|string|null
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 *
28979d65
CW
196 * @var bool|string|null
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 *
28979d65
CW
223 * @var bool|string|null
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 *
28979d65
CW
232 * @var bool|string|null
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 *
28979d65
CW
248 * @var bool|string|null
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 *
28979d65
CW
320 * @var bool|string|null
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 *
28979d65
CW
419 * @var bool|string|null
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 *
28979d65
CW
446 * @var bool|string|null
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 *
28979d65
CW
482 * @var bool|string|null
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 *
28979d65
CW
500 * @var bool|string|null
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 *
28979d65
CW
509 * @var bool|string|null
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 *
28979d65
CW
518 * @var bool|string|null
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 *
28979d65
CW
536 * @var bool|string|null
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 *
28979d65
CW
626 * @var bool|string|null
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 *
28979d65
CW
635 * @var bool|string|null
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 *
28979d65
CW
671 * @var bool|string|null
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.'),
a36434b9 855 'where' => 'civicrm_event.is_public',
e501603b 856 'default' => '1',
522a26c9 857 'table_name' => 'civicrm_event',
858 'entity' => 'Event',
859 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 860 'localizable' => 0,
c3fc2621 861 'html' => [
e501603b 862 'type' => 'CheckBox',
c3fc2621 863 ],
a9d0587b 864 'add' => '1.7',
c3fc2621
CW
865 ],
866 'event_start_date' => [
e501603b 867 'name' => 'start_date',
f61cf6ab 868 'type' => CRM_Utils_Type::T_TIMESTAMP,
c3fc2621 869 'title' => ts('Event Start Date'),
215b423e 870 'description' => ts('Date and time that event starts.'),
f61cf6ab 871 'required' => FALSE,
c3fc2621 872 'import' => TRUE,
e501603b
TO
873 'where' => 'civicrm_event.start_date',
874 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
c3fc2621 875 'export' => TRUE,
f61cf6ab 876 'default' => NULL,
522a26c9 877 'table_name' => 'civicrm_event',
878 'entity' => 'Event',
879 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 880 'localizable' => 0,
c3fc2621 881 'html' => [
e501603b 882 'type' => 'Select Date',
c03ba827 883 'formatType' => 'activityDateTime',
c3fc2621 884 ],
a9d0587b 885 'add' => '1.7',
c3fc2621
CW
886 ],
887 'event_end_date' => [
e501603b 888 'name' => 'end_date',
f61cf6ab 889 'type' => CRM_Utils_Type::T_TIMESTAMP,
c3fc2621 890 'title' => ts('Event End Date'),
215b423e 891 'description' => ts('Date and time that event ends. May be NULL if no defined end date/time'),
f61cf6ab 892 'required' => FALSE,
c3fc2621 893 'import' => TRUE,
e501603b
TO
894 'where' => 'civicrm_event.end_date',
895 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
c3fc2621 896 'export' => TRUE,
f61cf6ab 897 'default' => NULL,
522a26c9 898 'table_name' => 'civicrm_event',
899 'entity' => 'Event',
900 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 901 'localizable' => 0,
c3fc2621 902 'html' => [
e501603b 903 'type' => 'Select Date',
c03ba827 904 'formatType' => 'activityDateTime',
c3fc2621 905 ],
a9d0587b 906 'add' => '1.7',
c3fc2621
CW
907 ],
908 'is_online_registration' => [
e501603b
TO
909 'name' => 'is_online_registration',
910 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 911 'title' => ts('Is Online Registration'),
215b423e 912 'description' => ts('If true, include registration link on Event Info page.'),
a36434b9 913 'where' => 'civicrm_event.is_online_registration',
45a83e42 914 'default' => '0',
522a26c9 915 'table_name' => 'civicrm_event',
916 'entity' => 'Event',
917 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 918 'localizable' => 0,
c3fc2621 919 'html' => [
e501603b 920 'type' => 'CheckBox',
c3fc2621 921 ],
a9d0587b 922 'add' => '1.7',
c3fc2621
CW
923 ],
924 'registration_link_text' => [
e501603b
TO
925 'name' => 'registration_link_text',
926 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 927 'title' => ts('Event Registration Link Text'),
215b423e 928 'description' => ts('Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.'),
e501603b
TO
929 'maxlength' => 255,
930 'size' => CRM_Utils_Type::HUGE,
a36434b9 931 'where' => 'civicrm_event.registration_link_text',
522a26c9 932 'table_name' => 'civicrm_event',
933 'entity' => 'Event',
934 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 935 'localizable' => 1,
c3fc2621 936 'html' => [
e501603b 937 'type' => 'Text',
c3fc2621 938 ],
a9d0587b 939 'add' => '1.7',
c3fc2621
CW
940 ],
941 'registration_start_date' => [
e501603b 942 'name' => 'registration_start_date',
f61cf6ab 943 'type' => CRM_Utils_Type::T_TIMESTAMP,
c3fc2621 944 'title' => ts('Registration Start Date'),
215b423e 945 'description' => ts('Date and time that online registration starts.'),
f61cf6ab 946 'required' => FALSE,
a36434b9 947 'where' => 'civicrm_event.registration_start_date',
f61cf6ab 948 'default' => NULL,
522a26c9 949 'table_name' => 'civicrm_event',
950 'entity' => 'Event',
951 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 952 'localizable' => 0,
c3fc2621 953 'html' => [
e501603b 954 'type' => 'Select Date',
c03ba827 955 'formatType' => 'activityDateTime',
c23563e3 956 'label' => ts("Registration Start Date"),
c3fc2621 957 ],
a9d0587b 958 'add' => '1.8',
c3fc2621
CW
959 ],
960 'registration_end_date' => [
e501603b 961 'name' => 'registration_end_date',
f61cf6ab 962 'type' => CRM_Utils_Type::T_TIMESTAMP,
c3fc2621 963 'title' => ts('Registration End Date'),
215b423e 964 'description' => ts('Date and time that online registration ends.'),
f61cf6ab 965 'required' => FALSE,
a36434b9 966 'where' => 'civicrm_event.registration_end_date',
f61cf6ab 967 'default' => NULL,
522a26c9 968 'table_name' => 'civicrm_event',
969 'entity' => 'Event',
970 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 971 'localizable' => 0,
c3fc2621 972 'html' => [
e501603b 973 'type' => 'Select Date',
c03ba827 974 'formatType' => 'activityDateTime',
c23563e3 975 'label' => ts("Registration End Date"),
c3fc2621 976 ],
a9d0587b 977 'add' => '1.8',
c3fc2621
CW
978 ],
979 'max_participants' => [
e501603b
TO
980 'name' => 'max_participants',
981 'type' => CRM_Utils_Type::T_INT,
c3fc2621 982 'title' => ts('Max Participants'),
215b423e 983 'description' => ts('Maximum number of registered participants to allow. After max is reached, a custom Event Full message is displayed. If NULL, allow unlimited number of participants.'),
a36434b9 984 'where' => 'civicrm_event.max_participants',
5fb0de1f 985 'default' => NULL,
522a26c9 986 'table_name' => 'civicrm_event',
987 'entity' => 'Event',
988 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 989 'localizable' => 0,
c3fc2621 990 'html' => [
e501603b 991 'type' => 'Text',
c3fc2621 992 ],
a9d0587b 993 'add' => '1.7',
c3fc2621
CW
994 ],
995 'event_full_text' => [
e501603b
TO
996 'name' => 'event_full_text',
997 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 998 'title' => ts('Event Information'),
215b423e 999 'description' => ts('Message to display on Event Information page and INSTEAD OF Event Registration form if maximum participants are signed up. Can include email address/info about getting on a waiting list, etc. Text and html allowed.'),
e501603b
TO
1000 'rows' => 4,
1001 'cols' => 60,
a36434b9 1002 'where' => 'civicrm_event.event_full_text',
522a26c9 1003 'table_name' => 'civicrm_event',
1004 'entity' => 'Event',
1005 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1006 'localizable' => 1,
c3fc2621 1007 'html' => [
e501603b 1008 'type' => 'TextArea',
c3fc2621 1009 ],
a9d0587b 1010 'add' => '1.7',
c3fc2621
CW
1011 ],
1012 'is_monetary' => [
e501603b
TO
1013 'name' => 'is_monetary',
1014 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1015 'title' => ts('Is this a PAID event?'),
215b423e 1016 'description' => ts('If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.'),
a36434b9 1017 'where' => 'civicrm_event.is_monetary',
45a83e42 1018 'default' => '0',
522a26c9 1019 'table_name' => 'civicrm_event',
1020 'entity' => 'Event',
1021 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1022 'localizable' => 0,
c3fc2621 1023 'html' => [
e501603b 1024 'type' => 'CheckBox',
c3fc2621 1025 ],
a9d0587b 1026 'add' => '1.7',
c3fc2621
CW
1027 ],
1028 'financial_type_id' => [
e501603b
TO
1029 'name' => 'financial_type_id',
1030 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1031 'title' => ts('Financial Type'),
215b423e 1032 'description' => ts('Financial type assigned to paid event registrations for this event. Required if is_monetary is true.'),
a36434b9 1033 'where' => 'civicrm_event.financial_type_id',
5fb0de1f 1034 'default' => NULL,
522a26c9 1035 'table_name' => 'civicrm_event',
1036 'entity' => 'Event',
1037 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1038 'localizable' => 0,
c3fc2621 1039 'html' => [
e501603b 1040 'type' => 'Select',
c3fc2621
CW
1041 ],
1042 'pseudoconstant' => [
e501603b
TO
1043 'table' => 'civicrm_financial_type',
1044 'keyColumn' => 'id',
1045 'labelColumn' => 'name',
e6ca0a57 1046 ],
a9d0587b 1047 'add' => '4.3',
c3fc2621
CW
1048 ],
1049 'payment_processor' => [
e501603b
TO
1050 'name' => 'payment_processor',
1051 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1052 'title' => ts('Payment Processor'),
215b423e 1053 'description' => ts('Payment Processors configured for this Event (if is_monetary is true)'),
e501603b
TO
1054 'maxlength' => 128,
1055 'size' => CRM_Utils_Type::HUGE,
a36434b9 1056 'where' => 'civicrm_event.payment_processor',
522a26c9 1057 'table_name' => 'civicrm_event',
1058 'entity' => 'Event',
1059 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1060 'localizable' => 0,
476627e4 1061 'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED,
c3fc2621 1062 'html' => [
e501603b 1063 'type' => 'Select',
c23563e3 1064 'label' => ts("Payment Processors"),
c3fc2621
CW
1065 ],
1066 'pseudoconstant' => [
e501603b
TO
1067 'table' => 'civicrm_payment_processor',
1068 'keyColumn' => 'id',
1069 'labelColumn' => 'name',
e6ca0a57 1070 ],
a9d0587b 1071 'add' => '1.8',
c3fc2621
CW
1072 ],
1073 'is_map' => [
e501603b
TO
1074 'name' => 'is_map',
1075 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1076 'title' => ts('Map Enabled'),
215b423e 1077 'description' => ts('Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?'),
a36434b9 1078 'where' => 'civicrm_event.is_map',
45a83e42 1079 'default' => '0',
522a26c9 1080 'table_name' => 'civicrm_event',
1081 'entity' => 'Event',
1082 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1083 'localizable' => 0,
c3fc2621 1084 'html' => [
e501603b 1085 'type' => 'CheckBox',
c3fc2621 1086 ],
a9d0587b 1087 'add' => '1.7',
c3fc2621
CW
1088 ],
1089 'is_active' => [
e501603b
TO
1090 'name' => 'is_active',
1091 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1092 'title' => ts('Is Active'),
215b423e 1093 'description' => ts('Is this Event enabled or disabled/cancelled?'),
a36434b9 1094 'where' => 'civicrm_event.is_active',
45a83e42 1095 'default' => '0',
522a26c9 1096 'table_name' => 'civicrm_event',
1097 'entity' => 'Event',
1098 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1099 'localizable' => 0,
c3fc2621 1100 'html' => [
e501603b 1101 'type' => 'CheckBox',
c3fc2621 1102 ],
a9d0587b 1103 'add' => '1.7',
c3fc2621
CW
1104 ],
1105 'fee_label' => [
e501603b
TO
1106 'name' => 'fee_label',
1107 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1108 'title' => ts('Fee Label'),
e501603b
TO
1109 'maxlength' => 255,
1110 'size' => CRM_Utils_Type::HUGE,
c3fc2621 1111 'import' => TRUE,
e501603b
TO
1112 'where' => 'civicrm_event.fee_label',
1113 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
c3fc2621 1114 'export' => TRUE,
522a26c9 1115 'table_name' => 'civicrm_event',
1116 'entity' => 'Event',
1117 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1118 'localizable' => 1,
c3fc2621 1119 'html' => [
e501603b 1120 'type' => 'Text',
c3fc2621 1121 ],
a9d0587b 1122 'add' => '1.8',
c3fc2621
CW
1123 ],
1124 'is_show_location' => [
e501603b
TO
1125 'name' => 'is_show_location',
1126 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1127 'title' => ts('show location'),
215b423e 1128 'description' => ts('If true, show event location.'),
a36434b9 1129 'where' => 'civicrm_event.is_show_location',
e501603b 1130 'default' => '1',
522a26c9 1131 'table_name' => 'civicrm_event',
1132 'entity' => 'Event',
1133 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1134 'localizable' => 0,
c3fc2621 1135 'html' => [
e501603b 1136 'type' => 'CheckBox',
c3fc2621 1137 ],
a9d0587b 1138 'add' => '1.7',
c3fc2621
CW
1139 ],
1140 'loc_block_id' => [
e501603b
TO
1141 'name' => 'loc_block_id',
1142 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1143 'title' => ts('Location Block ID'),
215b423e 1144 'description' => ts('FK to Location Block ID'),
a36434b9 1145 'where' => 'civicrm_event.loc_block_id',
522a26c9 1146 'table_name' => 'civicrm_event',
1147 'entity' => 'Event',
1148 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1149 'localizable' => 0,
e501603b 1150 'FKClassName' => 'CRM_Core_DAO_LocBlock',
2cbbebe8
A
1151 'html' => [
1152 'label' => ts("Location Block"),
1153 ],
a9d0587b 1154 'add' => '2.0',
c3fc2621
CW
1155 ],
1156 'default_role_id' => [
e501603b
TO
1157 'name' => 'default_role_id',
1158 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1159 'title' => ts('Default Role'),
215b423e 1160 'description' => ts('Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.'),
c3fc2621 1161 'import' => TRUE,
e501603b 1162 'where' => 'civicrm_event.default_role_id',
c3fc2621 1163 'export' => TRUE,
e501603b 1164 'default' => '1',
522a26c9 1165 'table_name' => 'civicrm_event',
1166 'entity' => 'Event',
1167 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1168 'localizable' => 0,
c3fc2621 1169 'html' => [
e501603b 1170 'type' => 'Select',
c3fc2621
CW
1171 ],
1172 'pseudoconstant' => [
e501603b
TO
1173 'optionGroupName' => 'participant_role',
1174 'optionEditPath' => 'civicrm/admin/options/participant_role',
e6ca0a57 1175 ],
a9d0587b 1176 'add' => '2.0',
c3fc2621
CW
1177 ],
1178 'intro_text' => [
e501603b
TO
1179 'name' => 'intro_text',
1180 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1181 'title' => ts('Introductory Message'),
215b423e 1182 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
e501603b
TO
1183 'rows' => 6,
1184 'cols' => 50,
a36434b9 1185 'where' => 'civicrm_event.intro_text',
522a26c9 1186 'table_name' => 'civicrm_event',
1187 'entity' => 'Event',
1188 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1189 'localizable' => 1,
c3fc2621 1190 'html' => [
efb34c99 1191 'type' => 'RichTextEditor',
c3fc2621 1192 ],
a9d0587b 1193 'add' => '1.7',
c3fc2621
CW
1194 ],
1195 'footer_text' => [
e501603b
TO
1196 'name' => 'footer_text',
1197 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1198 'title' => ts('Footer Message'),
215b423e 1199 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
e501603b
TO
1200 'rows' => 6,
1201 'cols' => 50,
a36434b9 1202 'where' => 'civicrm_event.footer_text',
522a26c9 1203 'table_name' => 'civicrm_event',
1204 'entity' => 'Event',
1205 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1206 'localizable' => 1,
c3fc2621 1207 'html' => [
efb34c99 1208 'type' => 'RichTextEditor',
c3fc2621 1209 ],
a9d0587b 1210 'add' => '1.7',
c3fc2621
CW
1211 ],
1212 'confirm_title' => [
e501603b
TO
1213 'name' => 'confirm_title',
1214 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1215 'title' => ts('Confirmation Title'),
215b423e 1216 'description' => ts('Title for Confirmation page.'),
e501603b
TO
1217 'maxlength' => 255,
1218 'size' => CRM_Utils_Type::HUGE,
a36434b9 1219 'where' => 'civicrm_event.confirm_title',
5fb0de1f 1220 'default' => NULL,
522a26c9 1221 'table_name' => 'civicrm_event',
1222 'entity' => 'Event',
1223 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1224 'localizable' => 1,
c3fc2621 1225 'html' => [
e501603b 1226 'type' => 'Text',
c3fc2621 1227 ],
a9d0587b 1228 'add' => '1.7',
c3fc2621
CW
1229 ],
1230 'confirm_text' => [
e501603b
TO
1231 'name' => 'confirm_text',
1232 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1233 'title' => ts('Confirm Text'),
215b423e 1234 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
e501603b
TO
1235 'rows' => 6,
1236 'cols' => 50,
a36434b9 1237 'where' => 'civicrm_event.confirm_text',
522a26c9 1238 'table_name' => 'civicrm_event',
1239 'entity' => 'Event',
1240 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1241 'localizable' => 1,
c3fc2621 1242 'html' => [
efb34c99 1243 'type' => 'RichTextEditor',
c3fc2621 1244 ],
a9d0587b 1245 'add' => '1.7',
c3fc2621
CW
1246 ],
1247 'confirm_footer_text' => [
e501603b
TO
1248 'name' => 'confirm_footer_text',
1249 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1250 'title' => ts('Footer Text'),
215b423e 1251 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
e501603b
TO
1252 'rows' => 6,
1253 'cols' => 50,
a36434b9 1254 'where' => 'civicrm_event.confirm_footer_text',
522a26c9 1255 'table_name' => 'civicrm_event',
1256 'entity' => 'Event',
1257 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1258 'localizable' => 1,
c3fc2621 1259 'html' => [
efb34c99 1260 'type' => 'RichTextEditor',
c3fc2621 1261 ],
a9d0587b 1262 'add' => '1.7',
c3fc2621
CW
1263 ],
1264 'is_email_confirm' => [
e501603b
TO
1265 'name' => 'is_email_confirm',
1266 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1267 'title' => ts('Is confirm email'),
215b423e 1268 'description' => ts('If true, confirmation is automatically emailed to contact on successful registration.'),
a36434b9 1269 'where' => 'civicrm_event.is_email_confirm',
45a83e42 1270 'default' => '0',
522a26c9 1271 'table_name' => 'civicrm_event',
1272 'entity' => 'Event',
1273 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1274 'localizable' => 0,
c3fc2621 1275 'html' => [
e501603b 1276 'type' => 'CheckBox',
c3fc2621 1277 ],
a9d0587b 1278 'add' => '1.7',
c3fc2621
CW
1279 ],
1280 'confirm_email_text' => [
e501603b
TO
1281 'name' => 'confirm_email_text',
1282 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1283 'title' => ts('Confirmation Email Text'),
215b423e 1284 '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
1285 'rows' => 4,
1286 'cols' => 50,
a36434b9 1287 'where' => 'civicrm_event.confirm_email_text',
522a26c9 1288 'table_name' => 'civicrm_event',
1289 'entity' => 'Event',
1290 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1291 'localizable' => 1,
c3fc2621 1292 'html' => [
e501603b 1293 'type' => 'TextArea',
c3fc2621 1294 ],
a9d0587b 1295 'add' => '1.7',
c3fc2621
CW
1296 ],
1297 'confirm_from_name' => [
e501603b
TO
1298 'name' => 'confirm_from_name',
1299 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1300 'title' => ts('Confirm From Name'),
215b423e 1301 'description' => ts('FROM email name used for confirmation emails.'),
e501603b
TO
1302 'maxlength' => 255,
1303 'size' => CRM_Utils_Type::HUGE,
a36434b9 1304 'where' => 'civicrm_event.confirm_from_name',
522a26c9 1305 'table_name' => 'civicrm_event',
1306 'entity' => 'Event',
1307 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1308 'localizable' => 1,
c3fc2621 1309 'html' => [
e501603b 1310 'type' => 'Text',
c3fc2621 1311 ],
a9d0587b 1312 'add' => '1.7',
c3fc2621
CW
1313 ],
1314 'confirm_from_email' => [
e501603b
TO
1315 'name' => 'confirm_from_email',
1316 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1317 'title' => ts('Confirm From Email'),
215b423e 1318 'description' => ts('FROM email address used for confirmation emails.'),
e501603b
TO
1319 'maxlength' => 255,
1320 'size' => CRM_Utils_Type::HUGE,
a36434b9 1321 'where' => 'civicrm_event.confirm_from_email',
522a26c9 1322 'table_name' => 'civicrm_event',
1323 'entity' => 'Event',
1324 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1325 'localizable' => 0,
c3fc2621 1326 'html' => [
e501603b 1327 'type' => 'Text',
c3fc2621 1328 ],
a9d0587b 1329 'add' => '1.7',
c3fc2621
CW
1330 ],
1331 'cc_confirm' => [
e501603b
TO
1332 'name' => 'cc_confirm',
1333 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1334 'title' => ts('Cc Confirm'),
215b423e 1335 'description' => ts('comma-separated list of email addresses to cc each time a confirmation is sent'),
e501603b
TO
1336 'maxlength' => 255,
1337 'size' => CRM_Utils_Type::HUGE,
a36434b9 1338 'where' => 'civicrm_event.cc_confirm',
522a26c9 1339 'table_name' => 'civicrm_event',
1340 'entity' => 'Event',
1341 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1342 'localizable' => 0,
c3fc2621 1343 'html' => [
e501603b 1344 'type' => 'Text',
c23563e3 1345 'label' => ts("CC Confirm"),
c3fc2621 1346 ],
a9d0587b 1347 'add' => '1.7',
c3fc2621
CW
1348 ],
1349 'bcc_confirm' => [
e501603b
TO
1350 'name' => 'bcc_confirm',
1351 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1352 'title' => ts('Bcc Confirm'),
215b423e 1353 'description' => ts('comma-separated list of email addresses to bcc each time a confirmation is sent'),
e501603b
TO
1354 'maxlength' => 255,
1355 'size' => CRM_Utils_Type::HUGE,
a36434b9 1356 'where' => 'civicrm_event.bcc_confirm',
522a26c9 1357 'table_name' => 'civicrm_event',
1358 'entity' => 'Event',
1359 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1360 'localizable' => 0,
c3fc2621 1361 'html' => [
e501603b 1362 'type' => 'Text',
c23563e3 1363 'label' => ts("BCC Confirm"),
c3fc2621 1364 ],
a9d0587b 1365 'add' => '1.7',
c3fc2621
CW
1366 ],
1367 'default_fee_id' => [
e501603b
TO
1368 'name' => 'default_fee_id',
1369 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1370 'title' => ts('Default Fee ID'),
215b423e 1371 'description' => ts('FK to civicrm_option_value.'),
a36434b9 1372 'where' => 'civicrm_event.default_fee_id',
522a26c9 1373 'table_name' => 'civicrm_event',
1374 'entity' => 'Event',
1375 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1376 'localizable' => 0,
a9d0587b 1377 'add' => '1.7',
c3fc2621
CW
1378 ],
1379 'default_discount_fee_id' => [
e501603b
TO
1380 'name' => 'default_discount_fee_id',
1381 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1382 'title' => ts('Default Discount Fee ID'),
215b423e 1383 'description' => ts('FK to civicrm_option_value.'),
a36434b9 1384 'where' => 'civicrm_event.default_discount_fee_id',
522a26c9 1385 'table_name' => 'civicrm_event',
1386 'entity' => 'Event',
1387 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1388 'localizable' => 0,
a9d0587b 1389 'add' => '1.7',
c3fc2621
CW
1390 ],
1391 'thankyou_title' => [
e501603b
TO
1392 'name' => 'thankyou_title',
1393 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1394 'title' => ts('ThankYou Title'),
215b423e 1395 'description' => ts('Title for ThankYou page.'),
e501603b
TO
1396 'maxlength' => 255,
1397 'size' => CRM_Utils_Type::HUGE,
a36434b9 1398 'where' => 'civicrm_event.thankyou_title',
5fb0de1f 1399 'default' => NULL,
522a26c9 1400 'table_name' => 'civicrm_event',
1401 'entity' => 'Event',
1402 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1403 'localizable' => 1,
c3fc2621 1404 'html' => [
e501603b 1405 'type' => 'Text',
c3fc2621 1406 ],
a9d0587b 1407 'add' => '1.7',
c3fc2621
CW
1408 ],
1409 'thankyou_text' => [
e501603b
TO
1410 'name' => 'thankyou_text',
1411 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1412 'title' => ts('ThankYou Text'),
215b423e 1413 'description' => ts('ThankYou Text.'),
e501603b
TO
1414 'rows' => 6,
1415 'cols' => 50,
a36434b9 1416 'where' => 'civicrm_event.thankyou_text',
522a26c9 1417 'table_name' => 'civicrm_event',
1418 'entity' => 'Event',
1419 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1420 'localizable' => 1,
c3fc2621 1421 'html' => [
efb34c99 1422 'type' => 'RichTextEditor',
c3fc2621 1423 ],
a9d0587b 1424 'add' => '1.7',
c3fc2621
CW
1425 ],
1426 'thankyou_footer_text' => [
e501603b
TO
1427 'name' => 'thankyou_footer_text',
1428 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1429 'title' => ts('Footer Text'),
215b423e 1430 'description' => ts('Footer message.'),
e501603b
TO
1431 'rows' => 6,
1432 'cols' => 50,
a36434b9 1433 'where' => 'civicrm_event.thankyou_footer_text',
522a26c9 1434 'table_name' => 'civicrm_event',
1435 'entity' => 'Event',
1436 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1437 'localizable' => 1,
c3fc2621 1438 'html' => [
efb34c99 1439 'type' => 'RichTextEditor',
c3fc2621 1440 ],
a9d0587b 1441 'add' => '1.7',
c3fc2621
CW
1442 ],
1443 'is_pay_later' => [
e501603b
TO
1444 'name' => 'is_pay_later',
1445 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1446 'title' => ts('Pay Later Allowed'),
215b423e 1447 'description' => ts('if true - allows the user to send payment directly to the org later'),
a36434b9 1448 'where' => 'civicrm_event.is_pay_later',
45a83e42 1449 'default' => '0',
522a26c9 1450 'table_name' => 'civicrm_event',
1451 'entity' => 'Event',
1452 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1453 'localizable' => 0,
c3fc2621 1454 'html' => [
e501603b 1455 'type' => 'CheckBox',
c3fc2621 1456 ],
a9d0587b 1457 'add' => '2.0',
c3fc2621
CW
1458 ],
1459 'pay_later_text' => [
e501603b
TO
1460 'name' => 'pay_later_text',
1461 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1462 'title' => ts('Pay Later Text'),
215b423e 1463 'description' => ts('The text displayed to the user in the main form'),
a36434b9 1464 'where' => 'civicrm_event.pay_later_text',
522a26c9 1465 'table_name' => 'civicrm_event',
1466 'entity' => 'Event',
1467 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1468 'localizable' => 1,
c3fc2621 1469 'html' => [
efb34c99 1470 'type' => 'RichTextEditor',
c3fc2621 1471 ],
a9d0587b 1472 'add' => '2.0',
c3fc2621
CW
1473 ],
1474 'pay_later_receipt' => [
e501603b
TO
1475 'name' => 'pay_later_receipt',
1476 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1477 'title' => ts('Pay Later Receipt Text'),
215b423e 1478 'description' => ts('The receipt sent to the user instead of the normal receipt text'),
a36434b9 1479 'where' => 'civicrm_event.pay_later_receipt',
522a26c9 1480 'table_name' => 'civicrm_event',
1481 'entity' => 'Event',
1482 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1483 'localizable' => 1,
c3fc2621 1484 'html' => [
e501603b 1485 'type' => 'Text',
c3fc2621 1486 ],
a9d0587b 1487 'add' => '2.0',
c3fc2621
CW
1488 ],
1489 'is_partial_payment' => [
e501603b
TO
1490 'name' => 'is_partial_payment',
1491 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1492 'title' => ts('Partial Payments Enabled'),
215b423e 1493 'description' => ts('is partial payment enabled for this event'),
a36434b9 1494 'where' => 'civicrm_event.is_partial_payment',
45a83e42 1495 'default' => '0',
522a26c9 1496 'table_name' => 'civicrm_event',
1497 'entity' => 'Event',
1498 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1499 'localizable' => 0,
c3fc2621 1500 'html' => [
e501603b 1501 'type' => 'CheckBox',
c3fc2621 1502 ],
a9d0587b 1503 'add' => '4.3',
c3fc2621
CW
1504 ],
1505 'initial_amount_label' => [
e501603b
TO
1506 'name' => 'initial_amount_label',
1507 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1508 'title' => ts('Initial Amount Label'),
215b423e 1509 'description' => ts('Initial amount label for partial payment'),
e501603b
TO
1510 'maxlength' => 255,
1511 'size' => CRM_Utils_Type::HUGE,
a36434b9 1512 'where' => 'civicrm_event.initial_amount_label',
522a26c9 1513 'table_name' => 'civicrm_event',
1514 'entity' => 'Event',
1515 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1516 'localizable' => 1,
c3fc2621 1517 'html' => [
e501603b 1518 'type' => 'Text',
c3fc2621 1519 ],
a9d0587b 1520 'add' => '4.3',
c3fc2621
CW
1521 ],
1522 'initial_amount_help_text' => [
e501603b
TO
1523 'name' => 'initial_amount_help_text',
1524 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1525 'title' => ts('Initial Amount Help Text'),
215b423e 1526 'description' => ts('Initial amount help text for partial payment'),
a36434b9 1527 'where' => 'civicrm_event.initial_amount_help_text',
522a26c9 1528 'table_name' => 'civicrm_event',
1529 'entity' => 'Event',
1530 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1531 'localizable' => 1,
c3fc2621 1532 'html' => [
e501603b 1533 'type' => 'Text',
c3fc2621 1534 ],
a9d0587b 1535 'add' => '4.3',
c3fc2621
CW
1536 ],
1537 'min_initial_amount' => [
e501603b
TO
1538 'name' => 'min_initial_amount',
1539 'type' => CRM_Utils_Type::T_MONEY,
c3fc2621 1540 'title' => ts('Minimum Initial Amount'),
215b423e 1541 'description' => ts('Minimum initial amount for partial payment'),
c3fc2621 1542 'precision' => [
e501603b 1543 20,
fb607354 1544 2,
c3fc2621 1545 ],
a36434b9 1546 'where' => 'civicrm_event.min_initial_amount',
522a26c9 1547 'table_name' => 'civicrm_event',
1548 'entity' => 'Event',
1549 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1550 'localizable' => 0,
c3fc2621 1551 'html' => [
e501603b 1552 'type' => 'Text',
c3fc2621 1553 ],
a9d0587b 1554 'add' => '4.3',
c3fc2621
CW
1555 ],
1556 'is_multiple_registrations' => [
e501603b
TO
1557 'name' => 'is_multiple_registrations',
1558 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1559 'title' => ts('Allow Multiple Registrations'),
215b423e 1560 'description' => ts('if true - allows the user to register multiple participants for event'),
a36434b9 1561 'where' => 'civicrm_event.is_multiple_registrations',
45a83e42 1562 'default' => '0',
522a26c9 1563 'table_name' => 'civicrm_event',
1564 'entity' => 'Event',
1565 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1566 'localizable' => 0,
c3fc2621 1567 'html' => [
e501603b 1568 'type' => 'CheckBox',
c3fc2621 1569 ],
a9d0587b 1570 'add' => '2.1',
c3fc2621
CW
1571 ],
1572 'max_additional_participants' => [
e501603b
TO
1573 'name' => 'max_additional_participants',
1574 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1575 'title' => ts('Maximum number of additional participants per registration'),
215b423e 1576 'description' => ts('Maximum number of additional participants that can be registered on a single booking'),
a36434b9 1577 'where' => 'civicrm_event.max_additional_participants',
45a83e42 1578 'default' => '0',
522a26c9 1579 'table_name' => 'civicrm_event',
1580 'entity' => 'Event',
1581 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1582 'localizable' => 0,
a9d0587b 1583 'add' => '4.7',
c3fc2621
CW
1584 ],
1585 'allow_same_participant_emails' => [
e501603b
TO
1586 'name' => 'allow_same_participant_emails',
1587 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1588 'title' => ts('Does Event allow multiple registrations from same email address?'),
215b423e 1589 'description' => ts('if true - allows the user to register multiple registrations from same email address.'),
a36434b9 1590 'where' => 'civicrm_event.allow_same_participant_emails',
45a83e42 1591 'default' => '0',
522a26c9 1592 'table_name' => 'civicrm_event',
1593 'entity' => 'Event',
1594 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1595 'localizable' => 0,
c3fc2621 1596 'html' => [
e501603b 1597 'type' => 'CheckBox',
c3fc2621 1598 ],
a9d0587b 1599 'add' => '2.2',
c3fc2621
CW
1600 ],
1601 'has_waitlist' => [
e501603b
TO
1602 'name' => 'has_waitlist',
1603 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1604 'title' => ts('Waitlist Enabled'),
215b423e 1605 'description' => ts('Whether the event has waitlist support.'),
a36434b9 1606 'where' => 'civicrm_event.has_waitlist',
522a26c9 1607 'table_name' => 'civicrm_event',
1608 'entity' => 'Event',
1609 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1610 'localizable' => 0,
c3fc2621 1611 'html' => [
e501603b 1612 'type' => 'CheckBox',
c3fc2621 1613 ],
a9d0587b 1614 'add' => '3.0',
c3fc2621
CW
1615 ],
1616 'requires_approval' => [
e501603b
TO
1617 'name' => 'requires_approval',
1618 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1619 'title' => ts('Requires Approval'),
215b423e 1620 'description' => ts('Whether participants require approval before they can finish registering.'),
a36434b9 1621 'where' => 'civicrm_event.requires_approval',
522a26c9 1622 'table_name' => 'civicrm_event',
1623 'entity' => 'Event',
1624 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1625 'localizable' => 0,
c3fc2621 1626 'html' => [
e501603b 1627 'type' => 'CheckBox',
c23563e3 1628 'label' => ts("Requires Approval"),
c3fc2621 1629 ],
a9d0587b 1630 'add' => '3.0',
c3fc2621
CW
1631 ],
1632 'expiration_time' => [
e501603b
TO
1633 'name' => 'expiration_time',
1634 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1635 'title' => ts('Expiration Time'),
215b423e 1636 'description' => ts('Expire pending but unconfirmed registrations after this many hours.'),
a36434b9 1637 'where' => 'civicrm_event.expiration_time',
522a26c9 1638 'table_name' => 'civicrm_event',
1639 'entity' => 'Event',
1640 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1641 'localizable' => 0,
c3fc2621 1642 'html' => [
e501603b 1643 'type' => 'Text',
c23563e3 1644 'label' => ts("Expiration Time"),
c3fc2621 1645 ],
a9d0587b 1646 'add' => '3.0',
c3fc2621
CW
1647 ],
1648 'allow_selfcancelxfer' => [
e501603b
TO
1649 'name' => 'allow_selfcancelxfer',
1650 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1651 'title' => ts('Allow Self-service Cancellation or Transfer'),
215b423e 1652 'description' => ts('Allow self service cancellation or transfer for event?'),
a36434b9 1653 'where' => 'civicrm_event.allow_selfcancelxfer',
45a83e42 1654 'default' => '0',
522a26c9 1655 'table_name' => 'civicrm_event',
1656 'entity' => 'Event',
1657 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1658 'localizable' => 0,
c3fc2621 1659 'html' => [
e501603b 1660 'type' => 'CheckBox',
c3fc2621 1661 ],
a9d0587b 1662 'add' => '4.7',
c3fc2621
CW
1663 ],
1664 'selfcancelxfer_time' => [
e501603b
TO
1665 'name' => 'selfcancelxfer_time',
1666 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1667 'title' => ts('Self-service Cancellation or Transfer Time'),
215b423e 1668 'description' => ts('Number of hours prior to event start date to allow self-service cancellation or transfer.'),
a36434b9 1669 'where' => 'civicrm_event.selfcancelxfer_time',
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' => 'Text',
c3fc2621 1677 ],
a9d0587b 1678 'add' => '4.7',
c3fc2621
CW
1679 ],
1680 'waitlist_text' => [
e501603b
TO
1681 'name' => 'waitlist_text',
1682 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1683 'title' => ts('Waitlist Text'),
215b423e 1684 'description' => ts('Text to display when the event is full, but participants can signup for a waitlist.'),
e501603b
TO
1685 'rows' => 4,
1686 'cols' => 60,
a36434b9 1687 'where' => 'civicrm_event.waitlist_text',
522a26c9 1688 'table_name' => 'civicrm_event',
1689 'entity' => 'Event',
1690 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1691 'localizable' => 1,
c3fc2621 1692 'html' => [
e501603b 1693 'type' => 'TextArea',
c23563e3 1694 'label' => ts("Waitlist Text"),
c3fc2621 1695 ],
a9d0587b 1696 'add' => '3.0',
c3fc2621
CW
1697 ],
1698 'approval_req_text' => [
e501603b
TO
1699 'name' => 'approval_req_text',
1700 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1701 'title' => ts('Approval Req Text'),
215b423e 1702 'description' => ts('Text to display when the approval is required to complete registration for an event.'),
e501603b
TO
1703 'rows' => 4,
1704 'cols' => 60,
a36434b9 1705 'where' => 'civicrm_event.approval_req_text',
522a26c9 1706 'table_name' => 'civicrm_event',
1707 'entity' => 'Event',
1708 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1709 'localizable' => 1,
c3fc2621 1710 'html' => [
e501603b 1711 'type' => 'TextArea',
c23563e3 1712 'label' => ts("Approval Required Text"),
c3fc2621 1713 ],
a9d0587b 1714 'add' => '3.0',
c3fc2621
CW
1715 ],
1716 'is_template' => [
e501603b
TO
1717 'name' => 'is_template',
1718 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1719 'title' => ts('Is an Event Template'),
215b423e 1720 'description' => ts('whether the event has template'),
c3fc2621 1721 'required' => TRUE,
a36434b9 1722 'where' => 'civicrm_event.is_template',
45a83e42 1723 'default' => '0',
522a26c9 1724 'table_name' => 'civicrm_event',
1725 'entity' => 'Event',
1726 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1727 'localizable' => 0,
c3fc2621 1728 'html' => [
e501603b 1729 'type' => 'CheckBox',
c3fc2621 1730 ],
a9d0587b 1731 'add' => '3.0',
c3fc2621
CW
1732 ],
1733 'template_title' => [
e501603b
TO
1734 'name' => 'template_title',
1735 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1736 'title' => ts('Event Template Title'),
215b423e 1737 'description' => ts('Event Template Title'),
e501603b
TO
1738 'maxlength' => 255,
1739 'size' => CRM_Utils_Type::HUGE,
c3fc2621 1740 'import' => TRUE,
e501603b
TO
1741 'where' => 'civicrm_event.template_title',
1742 'headerPattern' => '/(template.)?title$/i',
c3fc2621 1743 'export' => TRUE,
522a26c9 1744 'table_name' => 'civicrm_event',
1745 'entity' => 'Event',
1746 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1747 'localizable' => 1,
c3fc2621 1748 'html' => [
e501603b 1749 'type' => 'Text',
c3fc2621 1750 ],
a9d0587b 1751 'add' => '3.0',
c3fc2621
CW
1752 ],
1753 'created_id' => [
e501603b
TO
1754 'name' => 'created_id',
1755 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1756 'title' => ts('Created By Contact ID'),
215b423e 1757 'description' => ts('FK to civicrm_contact, who created this event'),
a36434b9 1758 'where' => 'civicrm_event.created_id',
522a26c9 1759 'table_name' => 'civicrm_event',
1760 'entity' => 'Event',
1761 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1762 'localizable' => 0,
e501603b 1763 'FKClassName' => 'CRM_Contact_DAO_Contact',
2cbbebe8
A
1764 'html' => [
1765 'label' => ts("Created By"),
1766 ],
a9d0587b 1767 'add' => '3.0',
c3fc2621
CW
1768 ],
1769 'created_date' => [
e501603b
TO
1770 'name' => 'created_date',
1771 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
c3fc2621 1772 'title' => ts('Event Created Date'),
215b423e 1773 'description' => ts('Date and time that event was created.'),
a36434b9 1774 'where' => 'civicrm_event.created_date',
522a26c9 1775 'table_name' => 'civicrm_event',
1776 'entity' => 'Event',
1777 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1778 'localizable' => 0,
a9d0587b 1779 'add' => '3.0',
c3fc2621
CW
1780 ],
1781 'currency' => [
e501603b
TO
1782 'name' => 'currency',
1783 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1784 'title' => ts('Currency'),
215b423e 1785 'description' => ts('3 character string, value from config setting or input via user.'),
e501603b
TO
1786 'maxlength' => 3,
1787 'size' => CRM_Utils_Type::FOUR,
c3fc2621 1788 'import' => TRUE,
e501603b
TO
1789 'where' => 'civicrm_event.currency',
1790 'headerPattern' => '/cur(rency)?/i',
1791 'dataPattern' => '/^[A-Z]{3}$/i',
c3fc2621 1792 'export' => TRUE,
522a26c9 1793 'table_name' => 'civicrm_event',
1794 'entity' => 'Event',
1795 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1796 'localizable' => 0,
c3fc2621 1797 'html' => [
e501603b 1798 'type' => 'Select',
c23563e3 1799 'label' => ts("Currency"),
c3fc2621
CW
1800 ],
1801 'pseudoconstant' => [
e501603b
TO
1802 'table' => 'civicrm_currency',
1803 'keyColumn' => 'name',
1804 'labelColumn' => 'full_name',
1805 'nameColumn' => 'name',
a8fdb24e 1806 'abbrColumn' => 'symbol',
e6ca0a57 1807 ],
a9d0587b 1808 'add' => '3.3',
c3fc2621
CW
1809 ],
1810 'campaign_id' => [
e501603b
TO
1811 'name' => 'campaign_id',
1812 'type' => CRM_Utils_Type::T_INT,
2cbbebe8 1813 'title' => ts('Campaign ID'),
215b423e 1814 'description' => ts('The campaign for which this event has been created.'),
a36434b9 1815 'where' => 'civicrm_event.campaign_id',
522a26c9 1816 'table_name' => 'civicrm_event',
1817 'entity' => 'Event',
1818 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1819 'localizable' => 0,
e501603b 1820 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
88c31c05 1821 'component' => 'CiviCampaign',
c3fc2621 1822 'html' => [
e501603b 1823 'type' => 'EntityRef',
2cbbebe8 1824 'label' => ts("Campaign"),
c3fc2621 1825 ],
25ad69f2
CW
1826 'pseudoconstant' => [
1827 'table' => 'civicrm_campaign',
1828 'keyColumn' => 'id',
1829 'labelColumn' => 'title',
1830 'prefetch' => 'FALSE',
1831 ],
a9d0587b 1832 'add' => '3.4',
c3fc2621
CW
1833 ],
1834 'is_share' => [
e501603b
TO
1835 'name' => 'is_share',
1836 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1837 'title' => ts('Is shared through social media'),
215b423e 1838 'description' => ts('Can people share the event through social media?'),
a36434b9 1839 'where' => 'civicrm_event.is_share',
e501603b 1840 'default' => '1',
522a26c9 1841 'table_name' => 'civicrm_event',
1842 'entity' => 'Event',
1843 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1844 'localizable' => 0,
c3fc2621 1845 'html' => [
e501603b 1846 'type' => 'CheckBox',
c3fc2621 1847 ],
a9d0587b 1848 'add' => '4.1',
c3fc2621
CW
1849 ],
1850 'is_confirm_enabled' => [
e501603b
TO
1851 'name' => 'is_confirm_enabled',
1852 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1853 'title' => ts('Is the booking confirmation screen enabled?'),
215b423e 1854 'description' => ts('If false, the event booking confirmation screen gets skipped'),
a36434b9 1855 'where' => 'civicrm_event.is_confirm_enabled',
e501603b 1856 'default' => '1',
522a26c9 1857 'table_name' => 'civicrm_event',
1858 'entity' => 'Event',
1859 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1860 'localizable' => 0,
c3fc2621 1861 'html' => [
e501603b 1862 'type' => 'CheckBox',
c3fc2621 1863 ],
a9d0587b 1864 'add' => '4.5',
c3fc2621
CW
1865 ],
1866 'parent_event_id' => [
e501603b
TO
1867 'name' => 'parent_event_id',
1868 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1869 'title' => ts('Parent Event ID'),
215b423e 1870 'description' => ts('Implicit FK to civicrm_event: parent event'),
a36434b9 1871 'where' => 'civicrm_event.parent_event_id',
5fb0de1f 1872 'default' => NULL,
522a26c9 1873 'table_name' => 'civicrm_event',
1874 'entity' => 'Event',
1875 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1876 'localizable' => 0,
c3fc2621 1877 'html' => [
e501603b 1878 'type' => 'EntityRef',
c3fc2621 1879 ],
a9d0587b 1880 'add' => '4.1',
c3fc2621
CW
1881 ],
1882 'slot_label_id' => [
e501603b
TO
1883 'name' => 'slot_label_id',
1884 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1885 'title' => ts('Subevent Slot Label ID'),
215b423e 1886 'description' => ts('Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.'),
a36434b9 1887 'where' => 'civicrm_event.slot_label_id',
5fb0de1f 1888 'default' => NULL,
522a26c9 1889 'table_name' => 'civicrm_event',
1890 'entity' => 'Event',
1891 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1892 'localizable' => 0,
c3fc2621 1893 'html' => [
e501603b 1894 'type' => 'Select',
c3fc2621 1895 ],
a9d0587b 1896 'add' => '4.1',
c3fc2621
CW
1897 ],
1898 'dedupe_rule_group_id' => [
e501603b
TO
1899 'name' => 'dedupe_rule_group_id',
1900 'type' => CRM_Utils_Type::T_INT,
2cbbebe8 1901 'title' => ts('Dedupe Rule ID'),
215b423e 1902 'description' => ts('Rule to use when matching registrations for this event'),
a36434b9 1903 'where' => 'civicrm_event.dedupe_rule_group_id',
5fb0de1f 1904 'default' => NULL,
522a26c9 1905 'table_name' => 'civicrm_event',
1906 'entity' => 'Event',
1907 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1908 'localizable' => 0,
bb4187d7 1909 'FKClassName' => 'CRM_Dedupe_DAO_DedupeRuleGroup',
c3fc2621 1910 'html' => [
e501603b 1911 'type' => 'Select',
2cbbebe8 1912 'label' => ts("Dedupe Rule"),
c3fc2621
CW
1913 ],
1914 'pseudoconstant' => [
e501603b
TO
1915 'table' => 'civicrm_dedupe_rule_group',
1916 'keyColumn' => 'id',
1917 'labelColumn' => 'title',
1918 'nameColumn' => 'name',
e6ca0a57 1919 ],
a9d0587b 1920 'add' => '4.5',
c3fc2621
CW
1921 ],
1922 'is_billing_required' => [
e501603b
TO
1923 'name' => 'is_billing_required',
1924 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1925 'title' => ts('Is billing block required'),
215b423e 1926 'description' => ts('if true than billing block is required this event'),
a36434b9 1927 'where' => 'civicrm_event.is_billing_required',
45a83e42 1928 'default' => '0',
522a26c9 1929 'table_name' => 'civicrm_event',
1930 'entity' => 'Event',
1931 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1932 'localizable' => 0,
c3fc2621 1933 'html' => [
e501603b 1934 'type' => 'CheckBox',
c3fc2621 1935 ],
a9d0587b 1936 'add' => '4.6',
c3fc2621 1937 ],
f61cf6ab
FW
1938 'event_tz' => [
1939 'name' => 'event_tz',
1940 'type' => CRM_Utils_Type::T_TEXT,
1941 'title' => ts('Event Time Zone'),
1942 'description' => ts('Event\'s native time zone'),
1943 'import' => TRUE,
1944 'where' => 'civicrm_event.event_tz',
1945 'export' => TRUE,
1946 'default' => NULL,
1947 'table_name' => 'civicrm_event',
1948 'entity' => 'Event',
1949 'bao' => 'CRM_Event_BAO_Event',
1950 'localizable' => 0,
1951 'html' => [
1952 'type' => 'Select',
1953 ],
1954 'pseudoconstant' => [
1955 'callback' => 'CRM_Core_SelectValues::timezone',
1956 ],
bccecebc 1957 'add' => '5.47',
f61cf6ab 1958 ],
c3fc2621 1959 ];
346aaaba 1960 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 1961 }
346aaaba 1962 return Civi::$statics[__CLASS__]['fields'];
e501603b 1963 }
c3fc2621 1964
e501603b 1965 /**
bd8e0b14 1966 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
1967 *
1968 * @return array
bd8e0b14 1969 * Array(string $name => string $uniqueName).
e501603b 1970 */
c3fc2621 1971 public static function &fieldKeys() {
bd8e0b14
TO
1972 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
1973 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 1974 }
bd8e0b14 1975 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b 1976 }
c3fc2621 1977
e501603b
TO
1978 /**
1979 * Returns the names of this table
1980 *
1981 * @return string
1982 */
c3fc2621 1983 public static function getTableName() {
e501603b
TO
1984 return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
1985 }
c3fc2621 1986
e501603b
TO
1987 /**
1988 * Returns if this table needs to be logged
1989 *
c3fc2621 1990 * @return bool
e501603b 1991 */
c3fc2621 1992 public function getLog() {
e501603b
TO
1993 return self::$_log;
1994 }
c3fc2621 1995
e501603b
TO
1996 /**
1997 * Returns the list of fields that can be imported
1998 *
1999 * @param bool $prefix
2000 *
2001 * @return array
2002 */
c3fc2621
CW
2003 public static function &import($prefix = FALSE) {
2004 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'event', $prefix, []);
60808919 2005 return $r;
e501603b 2006 }
c3fc2621 2007
e501603b
TO
2008 /**
2009 * Returns the list of fields that can be exported
2010 *
2011 * @param bool $prefix
2012 *
2013 * @return array
2014 */
c3fc2621
CW
2015 public static function &export($prefix = FALSE) {
2016 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'event', $prefix, []);
60808919 2017 return $r;
e501603b 2018 }
c3fc2621 2019
e7a6b91a
AS
2020 /**
2021 * Returns the list of indices
c3fc2621
CW
2022 *
2023 * @param bool $localize
2024 *
2025 * @return array
e7a6b91a
AS
2026 */
2027 public static function indices($localize = TRUE) {
c3fc2621
CW
2028 $indices = [
2029 'index_event_type_id' => [
e7a6b91a 2030 'name' => 'index_event_type_id',
c3fc2621 2031 'field' => [
e7a6b91a 2032 0 => 'event_type_id',
c3fc2621
CW
2033 ],
2034 'localizable' => FALSE,
e7a6b91a 2035 'sig' => 'civicrm_event::0::event_type_id',
c3fc2621
CW
2036 ],
2037 'index_participant_listing_id' => [
e7a6b91a 2038 'name' => 'index_participant_listing_id',
c3fc2621 2039 'field' => [
e7a6b91a 2040 0 => 'participant_listing_id',
c3fc2621
CW
2041 ],
2042 'localizable' => FALSE,
e7a6b91a 2043 'sig' => 'civicrm_event::0::participant_listing_id',
c3fc2621
CW
2044 ],
2045 'index_parent_event_id' => [
e7a6b91a 2046 'name' => 'index_parent_event_id',
c3fc2621 2047 'field' => [
e7a6b91a 2048 0 => 'parent_event_id',
c3fc2621
CW
2049 ],
2050 'localizable' => FALSE,
e7a6b91a 2051 'sig' => 'civicrm_event::0::parent_event_id',
c3fc2621
CW
2052 ],
2053 ];
e7a6b91a
AS
2054 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
2055 }
c3fc2621 2056
e501603b 2057}