Merge pull request #22930 from demeritcowboy/revert-event-timezone
[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
82e7e493 9 * (GenCodeChecksum:894f53608aa8036de5fab1dc90a407d5)
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 *
82e7e493 124 * @var string|null
125 * (SQL type: datetime)
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 *
82e7e493 133 * @var string|null
134 * (SQL type: datetime)
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 *
82e7e493 160 * @var string|null
161 * (SQL type: datetime)
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 *
82e7e493 169 * @var string|null
170 * (SQL type: datetime)
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
e501603b 677 /**
f41f0342 678 * Class constructor.
e501603b 679 */
c3fc2621 680 public function __construct() {
e501603b
TO
681 $this->__table = 'civicrm_event';
682 parent::__construct();
683 }
c3fc2621 684
449c4e6b
CW
685 /**
686 * Returns localized title of this entity.
7b66c3b5
AH
687 *
688 * @param bool $plural
689 * Whether to return the plural version of the title.
449c4e6b 690 */
7b66c3b5
AH
691 public static function getEntityTitle($plural = FALSE) {
692 return $plural ? ts('Events') : ts('Event');
449c4e6b
CW
693 }
694
2562d09a
CW
695 /**
696 * Returns user-friendly description of this entity.
697 *
698 * @return string
699 */
700 public static function getEntityDescription() {
701 return ts('Scheduled in-person or online events which contacts can register for and attend.');
702 }
703
e501603b 704 /**
f41f0342 705 * Returns foreign keys and entity references.
e501603b
TO
706 *
707 * @return array
708 * [CRM_Core_Reference_Interface]
709 */
c3fc2621 710 public static function getReferenceColumns() {
346aaaba 711 if (!isset(Civi::$statics[__CLASS__]['links'])) {
fa45b5b9 712 Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
c3fc2621
CW
713 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'loc_block_id', 'civicrm_loc_block', 'id');
714 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'created_id', 'civicrm_contact', 'id');
715 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
716 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'dedupe_rule_group_id', 'civicrm_dedupe_rule_group', 'id');
346aaaba 717 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
e501603b 718 }
346aaaba 719 return Civi::$statics[__CLASS__]['links'];
e501603b 720 }
c3fc2621 721
e501603b
TO
722 /**
723 * Returns all the column names of this table
724 *
725 * @return array
726 */
c3fc2621 727 public static function &fields() {
346aaaba 728 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
c3fc2621
CW
729 Civi::$statics[__CLASS__]['fields'] = [
730 'id' => [
e501603b
TO
731 'name' => 'id',
732 'type' => CRM_Utils_Type::T_INT,
c3fc2621 733 'title' => ts('Event ID'),
215b423e 734 'description' => ts('Event'),
c3fc2621 735 'required' => TRUE,
a36434b9 736 'where' => 'civicrm_event.id',
522a26c9 737 'table_name' => 'civicrm_event',
738 'entity' => 'Event',
739 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 740 'localizable' => 0,
2cbbebe8
A
741 'html' => [
742 'type' => 'Number',
743 ],
1fe423d6 744 'readonly' => TRUE,
a9d0587b 745 'add' => '1.7',
c3fc2621
CW
746 ],
747 'event_title' => [
e501603b
TO
748 'name' => 'title',
749 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 750 'title' => ts('Event Title'),
215b423e 751 'description' => ts('Event Title (e.g. Fall Fundraiser Dinner)'),
e501603b
TO
752 'maxlength' => 255,
753 'size' => CRM_Utils_Type::HUGE,
c3fc2621 754 'import' => TRUE,
e501603b
TO
755 'where' => 'civicrm_event.title',
756 'headerPattern' => '/(event.)?title$/i',
c3fc2621 757 'export' => TRUE,
522a26c9 758 'table_name' => 'civicrm_event',
759 'entity' => 'Event',
760 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 761 'localizable' => 1,
c3fc2621 762 'html' => [
e501603b 763 'type' => 'Text',
c3fc2621 764 ],
a9d0587b 765 'add' => '1.7',
c3fc2621
CW
766 ],
767 'summary' => [
e501603b
TO
768 'name' => 'summary',
769 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 770 'title' => ts('Event Summary'),
215b423e 771 '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
772 'rows' => 4,
773 'cols' => 60,
a36434b9 774 'where' => 'civicrm_event.summary',
522a26c9 775 'table_name' => 'civicrm_event',
776 'entity' => 'Event',
777 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 778 'localizable' => 1,
c3fc2621 779 'html' => [
e501603b 780 'type' => 'TextArea',
c3fc2621 781 ],
a9d0587b 782 'add' => '1.7',
c3fc2621
CW
783 ],
784 'event_description' => [
e501603b
TO
785 'name' => 'description',
786 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 787 'title' => ts('Event Description'),
215b423e 788 'description' => ts('Full description of event. Text and html allowed. Displayed on built-in Event Information screens.'),
e501603b
TO
789 'rows' => 8,
790 'cols' => 60,
a36434b9 791 'where' => 'civicrm_event.description',
522a26c9 792 'table_name' => 'civicrm_event',
793 'entity' => 'Event',
794 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 795 'localizable' => 1,
c3fc2621 796 'html' => [
efb34c99 797 'type' => 'RichTextEditor',
c3fc2621 798 ],
a9d0587b 799 'add' => '1.7',
c3fc2621
CW
800 ],
801 'event_type_id' => [
e501603b
TO
802 'name' => 'event_type_id',
803 'type' => CRM_Utils_Type::T_INT,
c3fc2621 804 'title' => ts('Event Type'),
215b423e 805 'description' => ts('Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.'),
a36434b9 806 'where' => 'civicrm_event.event_type_id',
45a83e42 807 'default' => '0',
522a26c9 808 'table_name' => 'civicrm_event',
809 'entity' => 'Event',
810 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 811 'localizable' => 0,
c3fc2621 812 'html' => [
e501603b 813 'type' => 'Select',
c3fc2621
CW
814 ],
815 'pseudoconstant' => [
e501603b
TO
816 'optionGroupName' => 'event_type',
817 'optionEditPath' => 'civicrm/admin/options/event_type',
e6ca0a57 818 ],
a9d0587b 819 'add' => '1.7',
c3fc2621
CW
820 ],
821 'participant_listing_id' => [
e501603b
TO
822 'name' => 'participant_listing_id',
823 'type' => CRM_Utils_Type::T_INT,
c3fc2621 824 'title' => ts('Participant Listing'),
215b423e 825 'description' => ts('Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.'),
a36434b9 826 'where' => 'civicrm_event.participant_listing_id',
5fb0de1f 827 'default' => NULL,
522a26c9 828 'table_name' => 'civicrm_event',
829 'entity' => 'Event',
830 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 831 'localizable' => 0,
c3fc2621 832 'html' => [
e501603b 833 'type' => 'Select',
c3fc2621
CW
834 ],
835 'pseudoconstant' => [
e501603b
TO
836 'optionGroupName' => 'participant_listing',
837 'optionEditPath' => 'civicrm/admin/options/participant_listing',
e6ca0a57 838 ],
a9d0587b 839 'add' => '2.0',
c3fc2621
CW
840 ],
841 'is_public' => [
e501603b
TO
842 'name' => 'is_public',
843 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 844 'title' => ts('Is Event Public'),
215b423e 845 'description' => ts('Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.'),
a36434b9 846 'where' => 'civicrm_event.is_public',
e501603b 847 'default' => '1',
522a26c9 848 'table_name' => 'civicrm_event',
849 'entity' => 'Event',
850 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 851 'localizable' => 0,
c3fc2621 852 'html' => [
e501603b 853 'type' => 'CheckBox',
c3fc2621 854 ],
a9d0587b 855 'add' => '1.7',
c3fc2621
CW
856 ],
857 'event_start_date' => [
e501603b 858 'name' => 'start_date',
82e7e493 859 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
c3fc2621 860 'title' => ts('Event Start Date'),
215b423e 861 'description' => ts('Date and time that event starts.'),
c3fc2621 862 'import' => TRUE,
e501603b
TO
863 'where' => 'civicrm_event.start_date',
864 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
c3fc2621 865 'export' => TRUE,
522a26c9 866 'table_name' => 'civicrm_event',
867 'entity' => 'Event',
868 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 869 'localizable' => 0,
c3fc2621 870 'html' => [
e501603b 871 'type' => 'Select Date',
c03ba827 872 'formatType' => 'activityDateTime',
c3fc2621 873 ],
a9d0587b 874 'add' => '1.7',
c3fc2621
CW
875 ],
876 'event_end_date' => [
e501603b 877 'name' => 'end_date',
82e7e493 878 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
c3fc2621 879 'title' => ts('Event End Date'),
215b423e 880 'description' => ts('Date and time that event ends. May be NULL if no defined end date/time'),
c3fc2621 881 'import' => TRUE,
e501603b
TO
882 'where' => 'civicrm_event.end_date',
883 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
c3fc2621 884 'export' => TRUE,
522a26c9 885 'table_name' => 'civicrm_event',
886 'entity' => 'Event',
887 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 888 'localizable' => 0,
c3fc2621 889 'html' => [
e501603b 890 'type' => 'Select Date',
c03ba827 891 'formatType' => 'activityDateTime',
c3fc2621 892 ],
a9d0587b 893 'add' => '1.7',
c3fc2621
CW
894 ],
895 'is_online_registration' => [
e501603b
TO
896 'name' => 'is_online_registration',
897 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 898 'title' => ts('Is Online Registration'),
215b423e 899 'description' => ts('If true, include registration link on Event Info page.'),
a36434b9 900 'where' => 'civicrm_event.is_online_registration',
45a83e42 901 'default' => '0',
522a26c9 902 'table_name' => 'civicrm_event',
903 'entity' => 'Event',
904 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 905 'localizable' => 0,
c3fc2621 906 'html' => [
e501603b 907 'type' => 'CheckBox',
c3fc2621 908 ],
a9d0587b 909 'add' => '1.7',
c3fc2621
CW
910 ],
911 'registration_link_text' => [
e501603b
TO
912 'name' => 'registration_link_text',
913 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 914 'title' => ts('Event Registration Link Text'),
215b423e 915 'description' => ts('Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.'),
e501603b
TO
916 'maxlength' => 255,
917 'size' => CRM_Utils_Type::HUGE,
a36434b9 918 'where' => 'civicrm_event.registration_link_text',
522a26c9 919 'table_name' => 'civicrm_event',
920 'entity' => 'Event',
921 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 922 'localizable' => 1,
c3fc2621 923 'html' => [
e501603b 924 'type' => 'Text',
c3fc2621 925 ],
a9d0587b 926 'add' => '1.7',
c3fc2621
CW
927 ],
928 'registration_start_date' => [
e501603b 929 'name' => 'registration_start_date',
82e7e493 930 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
c3fc2621 931 'title' => ts('Registration Start Date'),
215b423e 932 'description' => ts('Date and time that online registration starts.'),
a36434b9 933 'where' => 'civicrm_event.registration_start_date',
522a26c9 934 'table_name' => 'civicrm_event',
935 'entity' => 'Event',
936 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 937 'localizable' => 0,
c3fc2621 938 'html' => [
e501603b 939 'type' => 'Select Date',
c03ba827 940 'formatType' => 'activityDateTime',
c23563e3 941 'label' => ts("Registration Start Date"),
c3fc2621 942 ],
a9d0587b 943 'add' => '1.8',
c3fc2621
CW
944 ],
945 'registration_end_date' => [
e501603b 946 'name' => 'registration_end_date',
82e7e493 947 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
c3fc2621 948 'title' => ts('Registration End Date'),
215b423e 949 'description' => ts('Date and time that online registration ends.'),
a36434b9 950 'where' => 'civicrm_event.registration_end_date',
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 End Date"),
c3fc2621 959 ],
a9d0587b 960 'add' => '1.8',
c3fc2621
CW
961 ],
962 'max_participants' => [
e501603b
TO
963 'name' => 'max_participants',
964 'type' => CRM_Utils_Type::T_INT,
c3fc2621 965 'title' => ts('Max Participants'),
215b423e 966 '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 967 'where' => 'civicrm_event.max_participants',
5fb0de1f 968 'default' => NULL,
522a26c9 969 'table_name' => 'civicrm_event',
970 'entity' => 'Event',
971 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 972 'localizable' => 0,
c3fc2621 973 'html' => [
e501603b 974 'type' => 'Text',
c3fc2621 975 ],
a9d0587b 976 'add' => '1.7',
c3fc2621
CW
977 ],
978 'event_full_text' => [
e501603b
TO
979 'name' => 'event_full_text',
980 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 981 'title' => ts('Event Information'),
215b423e 982 '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
983 'rows' => 4,
984 'cols' => 60,
a36434b9 985 'where' => 'civicrm_event.event_full_text',
522a26c9 986 'table_name' => 'civicrm_event',
987 'entity' => 'Event',
988 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 989 'localizable' => 1,
c3fc2621 990 'html' => [
e501603b 991 'type' => 'TextArea',
c3fc2621 992 ],
a9d0587b 993 'add' => '1.7',
c3fc2621
CW
994 ],
995 'is_monetary' => [
e501603b
TO
996 'name' => 'is_monetary',
997 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 998 'title' => ts('Is this a PAID event?'),
215b423e 999 'description' => ts('If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.'),
a36434b9 1000 'where' => 'civicrm_event.is_monetary',
45a83e42 1001 'default' => '0',
522a26c9 1002 'table_name' => 'civicrm_event',
1003 'entity' => 'Event',
1004 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1005 'localizable' => 0,
c3fc2621 1006 'html' => [
e501603b 1007 'type' => 'CheckBox',
c3fc2621 1008 ],
a9d0587b 1009 'add' => '1.7',
c3fc2621
CW
1010 ],
1011 'financial_type_id' => [
e501603b
TO
1012 'name' => 'financial_type_id',
1013 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1014 'title' => ts('Financial Type'),
215b423e 1015 'description' => ts('Financial type assigned to paid event registrations for this event. Required if is_monetary is true.'),
a36434b9 1016 'where' => 'civicrm_event.financial_type_id',
5fb0de1f 1017 'default' => NULL,
522a26c9 1018 'table_name' => 'civicrm_event',
1019 'entity' => 'Event',
1020 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1021 'localizable' => 0,
c3fc2621 1022 'html' => [
e501603b 1023 'type' => 'Select',
c3fc2621
CW
1024 ],
1025 'pseudoconstant' => [
e501603b
TO
1026 'table' => 'civicrm_financial_type',
1027 'keyColumn' => 'id',
1028 'labelColumn' => 'name',
e6ca0a57 1029 ],
a9d0587b 1030 'add' => '4.3',
c3fc2621
CW
1031 ],
1032 'payment_processor' => [
e501603b
TO
1033 'name' => 'payment_processor',
1034 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1035 'title' => ts('Payment Processor'),
215b423e 1036 'description' => ts('Payment Processors configured for this Event (if is_monetary is true)'),
e501603b
TO
1037 'maxlength' => 128,
1038 'size' => CRM_Utils_Type::HUGE,
a36434b9 1039 'where' => 'civicrm_event.payment_processor',
522a26c9 1040 'table_name' => 'civicrm_event',
1041 'entity' => 'Event',
1042 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1043 'localizable' => 0,
476627e4 1044 'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED,
c3fc2621 1045 'html' => [
e501603b 1046 'type' => 'Select',
c23563e3 1047 'label' => ts("Payment Processors"),
c3fc2621
CW
1048 ],
1049 'pseudoconstant' => [
e501603b
TO
1050 'table' => 'civicrm_payment_processor',
1051 'keyColumn' => 'id',
1052 'labelColumn' => 'name',
e6ca0a57 1053 ],
a9d0587b 1054 'add' => '1.8',
c3fc2621
CW
1055 ],
1056 'is_map' => [
e501603b
TO
1057 'name' => 'is_map',
1058 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1059 'title' => ts('Map Enabled'),
215b423e 1060 'description' => ts('Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?'),
a36434b9 1061 'where' => 'civicrm_event.is_map',
45a83e42 1062 'default' => '0',
522a26c9 1063 'table_name' => 'civicrm_event',
1064 'entity' => 'Event',
1065 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1066 'localizable' => 0,
c3fc2621 1067 'html' => [
e501603b 1068 'type' => 'CheckBox',
c3fc2621 1069 ],
a9d0587b 1070 'add' => '1.7',
c3fc2621
CW
1071 ],
1072 'is_active' => [
e501603b
TO
1073 'name' => 'is_active',
1074 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1075 'title' => ts('Is Active'),
215b423e 1076 'description' => ts('Is this Event enabled or disabled/cancelled?'),
a36434b9 1077 'where' => 'civicrm_event.is_active',
45a83e42 1078 'default' => '0',
522a26c9 1079 'table_name' => 'civicrm_event',
1080 'entity' => 'Event',
1081 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1082 'localizable' => 0,
c3fc2621 1083 'html' => [
e501603b 1084 'type' => 'CheckBox',
c3fc2621 1085 ],
a9d0587b 1086 'add' => '1.7',
c3fc2621
CW
1087 ],
1088 'fee_label' => [
e501603b
TO
1089 'name' => 'fee_label',
1090 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1091 'title' => ts('Fee Label'),
e501603b
TO
1092 'maxlength' => 255,
1093 'size' => CRM_Utils_Type::HUGE,
c3fc2621 1094 'import' => TRUE,
e501603b
TO
1095 'where' => 'civicrm_event.fee_label',
1096 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
c3fc2621 1097 'export' => TRUE,
522a26c9 1098 'table_name' => 'civicrm_event',
1099 'entity' => 'Event',
1100 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1101 'localizable' => 1,
c3fc2621 1102 'html' => [
e501603b 1103 'type' => 'Text',
c3fc2621 1104 ],
a9d0587b 1105 'add' => '1.8',
c3fc2621
CW
1106 ],
1107 'is_show_location' => [
e501603b
TO
1108 'name' => 'is_show_location',
1109 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1110 'title' => ts('show location'),
215b423e 1111 'description' => ts('If true, show event location.'),
a36434b9 1112 'where' => 'civicrm_event.is_show_location',
e501603b 1113 'default' => '1',
522a26c9 1114 'table_name' => 'civicrm_event',
1115 'entity' => 'Event',
1116 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1117 'localizable' => 0,
c3fc2621 1118 'html' => [
e501603b 1119 'type' => 'CheckBox',
c3fc2621 1120 ],
a9d0587b 1121 'add' => '1.7',
c3fc2621
CW
1122 ],
1123 'loc_block_id' => [
e501603b
TO
1124 'name' => 'loc_block_id',
1125 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1126 'title' => ts('Location Block ID'),
215b423e 1127 'description' => ts('FK to Location Block ID'),
a36434b9 1128 'where' => 'civicrm_event.loc_block_id',
522a26c9 1129 'table_name' => 'civicrm_event',
1130 'entity' => 'Event',
1131 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1132 'localizable' => 0,
e501603b 1133 'FKClassName' => 'CRM_Core_DAO_LocBlock',
2cbbebe8
A
1134 'html' => [
1135 'label' => ts("Location Block"),
1136 ],
a9d0587b 1137 'add' => '2.0',
c3fc2621
CW
1138 ],
1139 'default_role_id' => [
e501603b
TO
1140 'name' => 'default_role_id',
1141 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1142 'title' => ts('Default Role'),
215b423e 1143 'description' => ts('Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.'),
c3fc2621 1144 'import' => TRUE,
e501603b 1145 'where' => 'civicrm_event.default_role_id',
c3fc2621 1146 'export' => TRUE,
e501603b 1147 'default' => '1',
522a26c9 1148 'table_name' => 'civicrm_event',
1149 'entity' => 'Event',
1150 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1151 'localizable' => 0,
c3fc2621 1152 'html' => [
e501603b 1153 'type' => 'Select',
c3fc2621
CW
1154 ],
1155 'pseudoconstant' => [
e501603b
TO
1156 'optionGroupName' => 'participant_role',
1157 'optionEditPath' => 'civicrm/admin/options/participant_role',
e6ca0a57 1158 ],
a9d0587b 1159 'add' => '2.0',
c3fc2621
CW
1160 ],
1161 'intro_text' => [
e501603b
TO
1162 'name' => 'intro_text',
1163 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1164 'title' => ts('Introductory Message'),
215b423e 1165 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
e501603b
TO
1166 'rows' => 6,
1167 'cols' => 50,
a36434b9 1168 'where' => 'civicrm_event.intro_text',
522a26c9 1169 'table_name' => 'civicrm_event',
1170 'entity' => 'Event',
1171 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1172 'localizable' => 1,
c3fc2621 1173 'html' => [
efb34c99 1174 'type' => 'RichTextEditor',
c3fc2621 1175 ],
a9d0587b 1176 'add' => '1.7',
c3fc2621
CW
1177 ],
1178 'footer_text' => [
e501603b
TO
1179 'name' => 'footer_text',
1180 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1181 'title' => ts('Footer Message'),
215b423e 1182 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
e501603b
TO
1183 'rows' => 6,
1184 'cols' => 50,
a36434b9 1185 'where' => 'civicrm_event.footer_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 'confirm_title' => [
e501603b
TO
1196 'name' => 'confirm_title',
1197 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1198 'title' => ts('Confirmation Title'),
215b423e 1199 'description' => ts('Title for Confirmation page.'),
e501603b
TO
1200 'maxlength' => 255,
1201 'size' => CRM_Utils_Type::HUGE,
a36434b9 1202 'where' => 'civicrm_event.confirm_title',
5fb0de1f 1203 'default' => NULL,
522a26c9 1204 'table_name' => 'civicrm_event',
1205 'entity' => 'Event',
1206 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1207 'localizable' => 1,
c3fc2621 1208 'html' => [
e501603b 1209 'type' => 'Text',
c3fc2621 1210 ],
a9d0587b 1211 'add' => '1.7',
c3fc2621
CW
1212 ],
1213 'confirm_text' => [
e501603b
TO
1214 'name' => 'confirm_text',
1215 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1216 'title' => ts('Confirm Text'),
215b423e 1217 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
e501603b
TO
1218 'rows' => 6,
1219 'cols' => 50,
a36434b9 1220 'where' => 'civicrm_event.confirm_text',
522a26c9 1221 'table_name' => 'civicrm_event',
1222 'entity' => 'Event',
1223 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1224 'localizable' => 1,
c3fc2621 1225 'html' => [
efb34c99 1226 'type' => 'RichTextEditor',
c3fc2621 1227 ],
a9d0587b 1228 'add' => '1.7',
c3fc2621
CW
1229 ],
1230 'confirm_footer_text' => [
e501603b
TO
1231 'name' => 'confirm_footer_text',
1232 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1233 'title' => ts('Footer Text'),
215b423e 1234 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
e501603b
TO
1235 'rows' => 6,
1236 'cols' => 50,
a36434b9 1237 'where' => 'civicrm_event.confirm_footer_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 'is_email_confirm' => [
e501603b
TO
1248 'name' => 'is_email_confirm',
1249 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1250 'title' => ts('Is confirm email'),
215b423e 1251 'description' => ts('If true, confirmation is automatically emailed to contact on successful registration.'),
a36434b9 1252 'where' => 'civicrm_event.is_email_confirm',
45a83e42 1253 'default' => '0',
522a26c9 1254 'table_name' => 'civicrm_event',
1255 'entity' => 'Event',
1256 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1257 'localizable' => 0,
c3fc2621 1258 'html' => [
e501603b 1259 'type' => 'CheckBox',
c3fc2621 1260 ],
a9d0587b 1261 'add' => '1.7',
c3fc2621
CW
1262 ],
1263 'confirm_email_text' => [
e501603b
TO
1264 'name' => 'confirm_email_text',
1265 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1266 'title' => ts('Confirmation Email Text'),
215b423e 1267 '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
1268 'rows' => 4,
1269 'cols' => 50,
a36434b9 1270 'where' => 'civicrm_event.confirm_email_text',
522a26c9 1271 'table_name' => 'civicrm_event',
1272 'entity' => 'Event',
1273 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1274 'localizable' => 1,
c3fc2621 1275 'html' => [
e501603b 1276 'type' => 'TextArea',
c3fc2621 1277 ],
a9d0587b 1278 'add' => '1.7',
c3fc2621
CW
1279 ],
1280 'confirm_from_name' => [
e501603b
TO
1281 'name' => 'confirm_from_name',
1282 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1283 'title' => ts('Confirm From Name'),
215b423e 1284 'description' => ts('FROM email name used for confirmation emails.'),
e501603b
TO
1285 'maxlength' => 255,
1286 'size' => CRM_Utils_Type::HUGE,
a36434b9 1287 'where' => 'civicrm_event.confirm_from_name',
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' => 'Text',
c3fc2621 1294 ],
a9d0587b 1295 'add' => '1.7',
c3fc2621
CW
1296 ],
1297 'confirm_from_email' => [
e501603b
TO
1298 'name' => 'confirm_from_email',
1299 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1300 'title' => ts('Confirm From Email'),
215b423e 1301 'description' => ts('FROM email address used for confirmation emails.'),
e501603b
TO
1302 'maxlength' => 255,
1303 'size' => CRM_Utils_Type::HUGE,
a36434b9 1304 'where' => 'civicrm_event.confirm_from_email',
522a26c9 1305 'table_name' => 'civicrm_event',
1306 'entity' => 'Event',
1307 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1308 'localizable' => 0,
c3fc2621 1309 'html' => [
e501603b 1310 'type' => 'Text',
c3fc2621 1311 ],
a9d0587b 1312 'add' => '1.7',
c3fc2621
CW
1313 ],
1314 'cc_confirm' => [
e501603b
TO
1315 'name' => 'cc_confirm',
1316 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1317 'title' => ts('Cc Confirm'),
215b423e 1318 'description' => ts('comma-separated list of email addresses to cc each time a confirmation is sent'),
e501603b
TO
1319 'maxlength' => 255,
1320 'size' => CRM_Utils_Type::HUGE,
a36434b9 1321 'where' => 'civicrm_event.cc_confirm',
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',
c23563e3 1328 'label' => ts("CC Confirm"),
c3fc2621 1329 ],
a9d0587b 1330 'add' => '1.7',
c3fc2621
CW
1331 ],
1332 'bcc_confirm' => [
e501603b
TO
1333 'name' => 'bcc_confirm',
1334 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1335 'title' => ts('Bcc Confirm'),
215b423e 1336 'description' => ts('comma-separated list of email addresses to bcc each time a confirmation is sent'),
e501603b
TO
1337 'maxlength' => 255,
1338 'size' => CRM_Utils_Type::HUGE,
a36434b9 1339 'where' => 'civicrm_event.bcc_confirm',
522a26c9 1340 'table_name' => 'civicrm_event',
1341 'entity' => 'Event',
1342 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1343 'localizable' => 0,
c3fc2621 1344 'html' => [
e501603b 1345 'type' => 'Text',
c23563e3 1346 'label' => ts("BCC Confirm"),
c3fc2621 1347 ],
a9d0587b 1348 'add' => '1.7',
c3fc2621
CW
1349 ],
1350 'default_fee_id' => [
e501603b
TO
1351 'name' => 'default_fee_id',
1352 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1353 'title' => ts('Default Fee ID'),
215b423e 1354 'description' => ts('FK to civicrm_option_value.'),
a36434b9 1355 'where' => 'civicrm_event.default_fee_id',
522a26c9 1356 'table_name' => 'civicrm_event',
1357 'entity' => 'Event',
1358 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1359 'localizable' => 0,
a9d0587b 1360 'add' => '1.7',
c3fc2621
CW
1361 ],
1362 'default_discount_fee_id' => [
e501603b
TO
1363 'name' => 'default_discount_fee_id',
1364 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1365 'title' => ts('Default Discount Fee ID'),
215b423e 1366 'description' => ts('FK to civicrm_option_value.'),
a36434b9 1367 'where' => 'civicrm_event.default_discount_fee_id',
522a26c9 1368 'table_name' => 'civicrm_event',
1369 'entity' => 'Event',
1370 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1371 'localizable' => 0,
a9d0587b 1372 'add' => '1.7',
c3fc2621
CW
1373 ],
1374 'thankyou_title' => [
e501603b
TO
1375 'name' => 'thankyou_title',
1376 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1377 'title' => ts('ThankYou Title'),
215b423e 1378 'description' => ts('Title for ThankYou page.'),
e501603b
TO
1379 'maxlength' => 255,
1380 'size' => CRM_Utils_Type::HUGE,
a36434b9 1381 'where' => 'civicrm_event.thankyou_title',
5fb0de1f 1382 'default' => NULL,
522a26c9 1383 'table_name' => 'civicrm_event',
1384 'entity' => 'Event',
1385 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1386 'localizable' => 1,
c3fc2621 1387 'html' => [
e501603b 1388 'type' => 'Text',
c3fc2621 1389 ],
a9d0587b 1390 'add' => '1.7',
c3fc2621
CW
1391 ],
1392 'thankyou_text' => [
e501603b
TO
1393 'name' => 'thankyou_text',
1394 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1395 'title' => ts('ThankYou Text'),
215b423e 1396 'description' => ts('ThankYou Text.'),
e501603b
TO
1397 'rows' => 6,
1398 'cols' => 50,
a36434b9 1399 'where' => 'civicrm_event.thankyou_text',
522a26c9 1400 'table_name' => 'civicrm_event',
1401 'entity' => 'Event',
1402 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1403 'localizable' => 1,
c3fc2621 1404 'html' => [
efb34c99 1405 'type' => 'RichTextEditor',
c3fc2621 1406 ],
a9d0587b 1407 'add' => '1.7',
c3fc2621
CW
1408 ],
1409 'thankyou_footer_text' => [
e501603b
TO
1410 'name' => 'thankyou_footer_text',
1411 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1412 'title' => ts('Footer Text'),
215b423e 1413 'description' => ts('Footer message.'),
e501603b
TO
1414 'rows' => 6,
1415 'cols' => 50,
a36434b9 1416 'where' => 'civicrm_event.thankyou_footer_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 'is_pay_later' => [
e501603b
TO
1427 'name' => 'is_pay_later',
1428 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1429 'title' => ts('Pay Later Allowed'),
215b423e 1430 'description' => ts('if true - allows the user to send payment directly to the org later'),
a36434b9 1431 'where' => 'civicrm_event.is_pay_later',
45a83e42 1432 'default' => '0',
522a26c9 1433 'table_name' => 'civicrm_event',
1434 'entity' => 'Event',
1435 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1436 'localizable' => 0,
c3fc2621 1437 'html' => [
e501603b 1438 'type' => 'CheckBox',
c3fc2621 1439 ],
a9d0587b 1440 'add' => '2.0',
c3fc2621
CW
1441 ],
1442 'pay_later_text' => [
e501603b
TO
1443 'name' => 'pay_later_text',
1444 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1445 'title' => ts('Pay Later Text'),
215b423e 1446 'description' => ts('The text displayed to the user in the main form'),
a36434b9 1447 'where' => 'civicrm_event.pay_later_text',
522a26c9 1448 'table_name' => 'civicrm_event',
1449 'entity' => 'Event',
1450 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1451 'localizable' => 1,
c3fc2621 1452 'html' => [
efb34c99 1453 'type' => 'RichTextEditor',
c3fc2621 1454 ],
a9d0587b 1455 'add' => '2.0',
c3fc2621
CW
1456 ],
1457 'pay_later_receipt' => [
e501603b
TO
1458 'name' => 'pay_later_receipt',
1459 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1460 'title' => ts('Pay Later Receipt Text'),
215b423e 1461 'description' => ts('The receipt sent to the user instead of the normal receipt text'),
a36434b9 1462 'where' => 'civicrm_event.pay_later_receipt',
522a26c9 1463 'table_name' => 'civicrm_event',
1464 'entity' => 'Event',
1465 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1466 'localizable' => 1,
c3fc2621 1467 'html' => [
e501603b 1468 'type' => 'Text',
c3fc2621 1469 ],
a9d0587b 1470 'add' => '2.0',
c3fc2621
CW
1471 ],
1472 'is_partial_payment' => [
e501603b
TO
1473 'name' => 'is_partial_payment',
1474 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1475 'title' => ts('Partial Payments Enabled'),
215b423e 1476 'description' => ts('is partial payment enabled for this event'),
a36434b9 1477 'where' => 'civicrm_event.is_partial_payment',
45a83e42 1478 'default' => '0',
522a26c9 1479 'table_name' => 'civicrm_event',
1480 'entity' => 'Event',
1481 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1482 'localizable' => 0,
c3fc2621 1483 'html' => [
e501603b 1484 'type' => 'CheckBox',
c3fc2621 1485 ],
a9d0587b 1486 'add' => '4.3',
c3fc2621
CW
1487 ],
1488 'initial_amount_label' => [
e501603b
TO
1489 'name' => 'initial_amount_label',
1490 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1491 'title' => ts('Initial Amount Label'),
215b423e 1492 'description' => ts('Initial amount label for partial payment'),
e501603b
TO
1493 'maxlength' => 255,
1494 'size' => CRM_Utils_Type::HUGE,
a36434b9 1495 'where' => 'civicrm_event.initial_amount_label',
522a26c9 1496 'table_name' => 'civicrm_event',
1497 'entity' => 'Event',
1498 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1499 'localizable' => 1,
c3fc2621 1500 'html' => [
e501603b 1501 'type' => 'Text',
c3fc2621 1502 ],
a9d0587b 1503 'add' => '4.3',
c3fc2621
CW
1504 ],
1505 'initial_amount_help_text' => [
e501603b
TO
1506 'name' => 'initial_amount_help_text',
1507 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1508 'title' => ts('Initial Amount Help Text'),
215b423e 1509 'description' => ts('Initial amount help text for partial payment'),
a36434b9 1510 'where' => 'civicrm_event.initial_amount_help_text',
522a26c9 1511 'table_name' => 'civicrm_event',
1512 'entity' => 'Event',
1513 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1514 'localizable' => 1,
c3fc2621 1515 'html' => [
e501603b 1516 'type' => 'Text',
c3fc2621 1517 ],
a9d0587b 1518 'add' => '4.3',
c3fc2621
CW
1519 ],
1520 'min_initial_amount' => [
e501603b
TO
1521 'name' => 'min_initial_amount',
1522 'type' => CRM_Utils_Type::T_MONEY,
c3fc2621 1523 'title' => ts('Minimum Initial Amount'),
215b423e 1524 'description' => ts('Minimum initial amount for partial payment'),
c3fc2621 1525 'precision' => [
e501603b 1526 20,
fb607354 1527 2,
c3fc2621 1528 ],
a36434b9 1529 'where' => 'civicrm_event.min_initial_amount',
522a26c9 1530 'table_name' => 'civicrm_event',
1531 'entity' => 'Event',
1532 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1533 'localizable' => 0,
c3fc2621 1534 'html' => [
e501603b 1535 'type' => 'Text',
c3fc2621 1536 ],
a9d0587b 1537 'add' => '4.3',
c3fc2621
CW
1538 ],
1539 'is_multiple_registrations' => [
e501603b
TO
1540 'name' => 'is_multiple_registrations',
1541 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1542 'title' => ts('Allow Multiple Registrations'),
215b423e 1543 'description' => ts('if true - allows the user to register multiple participants for event'),
a36434b9 1544 'where' => 'civicrm_event.is_multiple_registrations',
45a83e42 1545 'default' => '0',
522a26c9 1546 'table_name' => 'civicrm_event',
1547 'entity' => 'Event',
1548 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1549 'localizable' => 0,
c3fc2621 1550 'html' => [
e501603b 1551 'type' => 'CheckBox',
c3fc2621 1552 ],
a9d0587b 1553 'add' => '2.1',
c3fc2621
CW
1554 ],
1555 'max_additional_participants' => [
e501603b
TO
1556 'name' => 'max_additional_participants',
1557 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1558 'title' => ts('Maximum number of additional participants per registration'),
215b423e 1559 'description' => ts('Maximum number of additional participants that can be registered on a single booking'),
a36434b9 1560 'where' => 'civicrm_event.max_additional_participants',
45a83e42 1561 'default' => '0',
522a26c9 1562 'table_name' => 'civicrm_event',
1563 'entity' => 'Event',
1564 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1565 'localizable' => 0,
a9d0587b 1566 'add' => '4.7',
c3fc2621
CW
1567 ],
1568 'allow_same_participant_emails' => [
e501603b
TO
1569 'name' => 'allow_same_participant_emails',
1570 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1571 'title' => ts('Does Event allow multiple registrations from same email address?'),
215b423e 1572 'description' => ts('if true - allows the user to register multiple registrations from same email address.'),
a36434b9 1573 'where' => 'civicrm_event.allow_same_participant_emails',
45a83e42 1574 'default' => '0',
522a26c9 1575 'table_name' => 'civicrm_event',
1576 'entity' => 'Event',
1577 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1578 'localizable' => 0,
c3fc2621 1579 'html' => [
e501603b 1580 'type' => 'CheckBox',
c3fc2621 1581 ],
a9d0587b 1582 'add' => '2.2',
c3fc2621
CW
1583 ],
1584 'has_waitlist' => [
e501603b
TO
1585 'name' => 'has_waitlist',
1586 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1587 'title' => ts('Waitlist Enabled'),
215b423e 1588 'description' => ts('Whether the event has waitlist support.'),
a36434b9 1589 'where' => 'civicrm_event.has_waitlist',
522a26c9 1590 'table_name' => 'civicrm_event',
1591 'entity' => 'Event',
1592 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1593 'localizable' => 0,
c3fc2621 1594 'html' => [
e501603b 1595 'type' => 'CheckBox',
c3fc2621 1596 ],
a9d0587b 1597 'add' => '3.0',
c3fc2621
CW
1598 ],
1599 'requires_approval' => [
e501603b
TO
1600 'name' => 'requires_approval',
1601 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1602 'title' => ts('Requires Approval'),
215b423e 1603 'description' => ts('Whether participants require approval before they can finish registering.'),
a36434b9 1604 'where' => 'civicrm_event.requires_approval',
522a26c9 1605 'table_name' => 'civicrm_event',
1606 'entity' => 'Event',
1607 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1608 'localizable' => 0,
c3fc2621 1609 'html' => [
e501603b 1610 'type' => 'CheckBox',
c23563e3 1611 'label' => ts("Requires Approval"),
c3fc2621 1612 ],
a9d0587b 1613 'add' => '3.0',
c3fc2621
CW
1614 ],
1615 'expiration_time' => [
e501603b
TO
1616 'name' => 'expiration_time',
1617 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1618 'title' => ts('Expiration Time'),
215b423e 1619 'description' => ts('Expire pending but unconfirmed registrations after this many hours.'),
a36434b9 1620 'where' => 'civicrm_event.expiration_time',
522a26c9 1621 'table_name' => 'civicrm_event',
1622 'entity' => 'Event',
1623 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1624 'localizable' => 0,
c3fc2621 1625 'html' => [
e501603b 1626 'type' => 'Text',
c23563e3 1627 'label' => ts("Expiration Time"),
c3fc2621 1628 ],
a9d0587b 1629 'add' => '3.0',
c3fc2621
CW
1630 ],
1631 'allow_selfcancelxfer' => [
e501603b
TO
1632 'name' => 'allow_selfcancelxfer',
1633 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1634 'title' => ts('Allow Self-service Cancellation or Transfer'),
215b423e 1635 'description' => ts('Allow self service cancellation or transfer for event?'),
a36434b9 1636 'where' => 'civicrm_event.allow_selfcancelxfer',
45a83e42 1637 'default' => '0',
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' => 'CheckBox',
c3fc2621 1644 ],
a9d0587b 1645 'add' => '4.7',
c3fc2621
CW
1646 ],
1647 'selfcancelxfer_time' => [
e501603b
TO
1648 'name' => 'selfcancelxfer_time',
1649 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1650 'title' => ts('Self-service Cancellation or Transfer Time'),
215b423e 1651 'description' => ts('Number of hours prior to event start date to allow self-service cancellation or transfer.'),
a36434b9 1652 'where' => 'civicrm_event.selfcancelxfer_time',
45a83e42 1653 'default' => '0',
522a26c9 1654 'table_name' => 'civicrm_event',
1655 'entity' => 'Event',
1656 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1657 'localizable' => 0,
c3fc2621 1658 'html' => [
e501603b 1659 'type' => 'Text',
c3fc2621 1660 ],
a9d0587b 1661 'add' => '4.7',
c3fc2621
CW
1662 ],
1663 'waitlist_text' => [
e501603b
TO
1664 'name' => 'waitlist_text',
1665 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1666 'title' => ts('Waitlist Text'),
215b423e 1667 'description' => ts('Text to display when the event is full, but participants can signup for a waitlist.'),
e501603b
TO
1668 'rows' => 4,
1669 'cols' => 60,
a36434b9 1670 'where' => 'civicrm_event.waitlist_text',
522a26c9 1671 'table_name' => 'civicrm_event',
1672 'entity' => 'Event',
1673 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1674 'localizable' => 1,
c3fc2621 1675 'html' => [
e501603b 1676 'type' => 'TextArea',
c23563e3 1677 'label' => ts("Waitlist Text"),
c3fc2621 1678 ],
a9d0587b 1679 'add' => '3.0',
c3fc2621
CW
1680 ],
1681 'approval_req_text' => [
e501603b
TO
1682 'name' => 'approval_req_text',
1683 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 1684 'title' => ts('Approval Req Text'),
215b423e 1685 'description' => ts('Text to display when the approval is required to complete registration for an event.'),
e501603b
TO
1686 'rows' => 4,
1687 'cols' => 60,
a36434b9 1688 'where' => 'civicrm_event.approval_req_text',
522a26c9 1689 'table_name' => 'civicrm_event',
1690 'entity' => 'Event',
1691 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1692 'localizable' => 1,
c3fc2621 1693 'html' => [
e501603b 1694 'type' => 'TextArea',
c23563e3 1695 'label' => ts("Approval Required Text"),
c3fc2621 1696 ],
a9d0587b 1697 'add' => '3.0',
c3fc2621
CW
1698 ],
1699 'is_template' => [
e501603b
TO
1700 'name' => 'is_template',
1701 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1702 'title' => ts('Is an Event Template'),
215b423e 1703 'description' => ts('whether the event has template'),
c3fc2621 1704 'required' => TRUE,
a36434b9 1705 'where' => 'civicrm_event.is_template',
45a83e42 1706 'default' => '0',
522a26c9 1707 'table_name' => 'civicrm_event',
1708 'entity' => 'Event',
1709 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1710 'localizable' => 0,
c3fc2621 1711 'html' => [
e501603b 1712 'type' => 'CheckBox',
c3fc2621 1713 ],
a9d0587b 1714 'add' => '3.0',
c3fc2621
CW
1715 ],
1716 'template_title' => [
e501603b
TO
1717 'name' => 'template_title',
1718 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1719 'title' => ts('Event Template Title'),
215b423e 1720 'description' => ts('Event Template Title'),
e501603b
TO
1721 'maxlength' => 255,
1722 'size' => CRM_Utils_Type::HUGE,
c3fc2621 1723 'import' => TRUE,
e501603b
TO
1724 'where' => 'civicrm_event.template_title',
1725 'headerPattern' => '/(template.)?title$/i',
c3fc2621 1726 'export' => TRUE,
522a26c9 1727 'table_name' => 'civicrm_event',
1728 'entity' => 'Event',
1729 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1730 'localizable' => 1,
c3fc2621 1731 'html' => [
e501603b 1732 'type' => 'Text',
c3fc2621 1733 ],
a9d0587b 1734 'add' => '3.0',
c3fc2621
CW
1735 ],
1736 'created_id' => [
e501603b
TO
1737 'name' => 'created_id',
1738 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1739 'title' => ts('Created By Contact ID'),
215b423e 1740 'description' => ts('FK to civicrm_contact, who created this event'),
a36434b9 1741 'where' => 'civicrm_event.created_id',
522a26c9 1742 'table_name' => 'civicrm_event',
1743 'entity' => 'Event',
1744 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1745 'localizable' => 0,
e501603b 1746 'FKClassName' => 'CRM_Contact_DAO_Contact',
2cbbebe8
A
1747 'html' => [
1748 'label' => ts("Created By"),
1749 ],
a9d0587b 1750 'add' => '3.0',
c3fc2621
CW
1751 ],
1752 'created_date' => [
e501603b
TO
1753 'name' => 'created_date',
1754 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
c3fc2621 1755 'title' => ts('Event Created Date'),
215b423e 1756 'description' => ts('Date and time that event was created.'),
a36434b9 1757 'where' => 'civicrm_event.created_date',
522a26c9 1758 'table_name' => 'civicrm_event',
1759 'entity' => 'Event',
1760 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1761 'localizable' => 0,
a9d0587b 1762 'add' => '3.0',
c3fc2621
CW
1763 ],
1764 'currency' => [
e501603b
TO
1765 'name' => 'currency',
1766 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1767 'title' => ts('Currency'),
215b423e 1768 'description' => ts('3 character string, value from config setting or input via user.'),
e501603b
TO
1769 'maxlength' => 3,
1770 'size' => CRM_Utils_Type::FOUR,
c3fc2621 1771 'import' => TRUE,
e501603b
TO
1772 'where' => 'civicrm_event.currency',
1773 'headerPattern' => '/cur(rency)?/i',
1774 'dataPattern' => '/^[A-Z]{3}$/i',
c3fc2621 1775 'export' => TRUE,
522a26c9 1776 'table_name' => 'civicrm_event',
1777 'entity' => 'Event',
1778 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1779 'localizable' => 0,
c3fc2621 1780 'html' => [
e501603b 1781 'type' => 'Select',
c23563e3 1782 'label' => ts("Currency"),
c3fc2621
CW
1783 ],
1784 'pseudoconstant' => [
e501603b
TO
1785 'table' => 'civicrm_currency',
1786 'keyColumn' => 'name',
1787 'labelColumn' => 'full_name',
1788 'nameColumn' => 'name',
a8fdb24e 1789 'abbrColumn' => 'symbol',
e6ca0a57 1790 ],
a9d0587b 1791 'add' => '3.3',
c3fc2621
CW
1792 ],
1793 'campaign_id' => [
e501603b
TO
1794 'name' => 'campaign_id',
1795 'type' => CRM_Utils_Type::T_INT,
2cbbebe8 1796 'title' => ts('Campaign ID'),
215b423e 1797 'description' => ts('The campaign for which this event has been created.'),
a36434b9 1798 'where' => 'civicrm_event.campaign_id',
522a26c9 1799 'table_name' => 'civicrm_event',
1800 'entity' => 'Event',
1801 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1802 'localizable' => 0,
e501603b 1803 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
88c31c05 1804 'component' => 'CiviCampaign',
c3fc2621 1805 'html' => [
e501603b 1806 'type' => 'EntityRef',
2cbbebe8 1807 'label' => ts("Campaign"),
c3fc2621 1808 ],
25ad69f2
CW
1809 'pseudoconstant' => [
1810 'table' => 'civicrm_campaign',
1811 'keyColumn' => 'id',
1812 'labelColumn' => 'title',
1813 'prefetch' => 'FALSE',
1814 ],
a9d0587b 1815 'add' => '3.4',
c3fc2621
CW
1816 ],
1817 'is_share' => [
e501603b
TO
1818 'name' => 'is_share',
1819 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1820 'title' => ts('Is shared through social media'),
215b423e 1821 'description' => ts('Can people share the event through social media?'),
a36434b9 1822 'where' => 'civicrm_event.is_share',
e501603b 1823 'default' => '1',
522a26c9 1824 'table_name' => 'civicrm_event',
1825 'entity' => 'Event',
1826 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1827 'localizable' => 0,
c3fc2621 1828 'html' => [
e501603b 1829 'type' => 'CheckBox',
c3fc2621 1830 ],
a9d0587b 1831 'add' => '4.1',
c3fc2621
CW
1832 ],
1833 'is_confirm_enabled' => [
e501603b
TO
1834 'name' => 'is_confirm_enabled',
1835 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1836 'title' => ts('Is the booking confirmation screen enabled?'),
215b423e 1837 'description' => ts('If false, the event booking confirmation screen gets skipped'),
a36434b9 1838 'where' => 'civicrm_event.is_confirm_enabled',
e501603b 1839 'default' => '1',
522a26c9 1840 'table_name' => 'civicrm_event',
1841 'entity' => 'Event',
1842 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1843 'localizable' => 0,
c3fc2621 1844 'html' => [
e501603b 1845 'type' => 'CheckBox',
c3fc2621 1846 ],
a9d0587b 1847 'add' => '4.5',
c3fc2621
CW
1848 ],
1849 'parent_event_id' => [
e501603b
TO
1850 'name' => 'parent_event_id',
1851 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1852 'title' => ts('Parent Event ID'),
215b423e 1853 'description' => ts('Implicit FK to civicrm_event: parent event'),
a36434b9 1854 'where' => 'civicrm_event.parent_event_id',
5fb0de1f 1855 'default' => NULL,
522a26c9 1856 'table_name' => 'civicrm_event',
1857 'entity' => 'Event',
1858 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1859 'localizable' => 0,
c3fc2621 1860 'html' => [
e501603b 1861 'type' => 'EntityRef',
c3fc2621 1862 ],
a9d0587b 1863 'add' => '4.1',
c3fc2621
CW
1864 ],
1865 'slot_label_id' => [
e501603b
TO
1866 'name' => 'slot_label_id',
1867 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1868 'title' => ts('Subevent Slot Label ID'),
215b423e 1869 'description' => ts('Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.'),
a36434b9 1870 'where' => 'civicrm_event.slot_label_id',
5fb0de1f 1871 'default' => NULL,
522a26c9 1872 'table_name' => 'civicrm_event',
1873 'entity' => 'Event',
1874 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1875 'localizable' => 0,
c3fc2621 1876 'html' => [
e501603b 1877 'type' => 'Select',
c3fc2621 1878 ],
a9d0587b 1879 'add' => '4.1',
c3fc2621
CW
1880 ],
1881 'dedupe_rule_group_id' => [
e501603b
TO
1882 'name' => 'dedupe_rule_group_id',
1883 'type' => CRM_Utils_Type::T_INT,
2cbbebe8 1884 'title' => ts('Dedupe Rule ID'),
215b423e 1885 'description' => ts('Rule to use when matching registrations for this event'),
a36434b9 1886 'where' => 'civicrm_event.dedupe_rule_group_id',
5fb0de1f 1887 'default' => NULL,
522a26c9 1888 'table_name' => 'civicrm_event',
1889 'entity' => 'Event',
1890 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1891 'localizable' => 0,
bb4187d7 1892 'FKClassName' => 'CRM_Dedupe_DAO_DedupeRuleGroup',
c3fc2621 1893 'html' => [
e501603b 1894 'type' => 'Select',
2cbbebe8 1895 'label' => ts("Dedupe Rule"),
c3fc2621
CW
1896 ],
1897 'pseudoconstant' => [
e501603b
TO
1898 'table' => 'civicrm_dedupe_rule_group',
1899 'keyColumn' => 'id',
1900 'labelColumn' => 'title',
1901 'nameColumn' => 'name',
e6ca0a57 1902 ],
a9d0587b 1903 'add' => '4.5',
c3fc2621
CW
1904 ],
1905 'is_billing_required' => [
e501603b
TO
1906 'name' => 'is_billing_required',
1907 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1908 'title' => ts('Is billing block required'),
215b423e 1909 'description' => ts('if true than billing block is required this event'),
a36434b9 1910 'where' => 'civicrm_event.is_billing_required',
45a83e42 1911 'default' => '0',
522a26c9 1912 'table_name' => 'civicrm_event',
1913 'entity' => 'Event',
1914 'bao' => 'CRM_Event_BAO_Event',
6a7e5e5d 1915 'localizable' => 0,
c3fc2621 1916 'html' => [
e501603b 1917 'type' => 'CheckBox',
c3fc2621 1918 ],
a9d0587b 1919 'add' => '4.6',
c3fc2621
CW
1920 ],
1921 ];
346aaaba 1922 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 1923 }
346aaaba 1924 return Civi::$statics[__CLASS__]['fields'];
e501603b 1925 }
c3fc2621 1926
e501603b 1927 /**
bd8e0b14 1928 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
1929 *
1930 * @return array
bd8e0b14 1931 * Array(string $name => string $uniqueName).
e501603b 1932 */
c3fc2621 1933 public static function &fieldKeys() {
bd8e0b14
TO
1934 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
1935 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 1936 }
bd8e0b14 1937 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b 1938 }
c3fc2621 1939
e501603b
TO
1940 /**
1941 * Returns the names of this table
1942 *
1943 * @return string
1944 */
c3fc2621 1945 public static function getTableName() {
e501603b
TO
1946 return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
1947 }
c3fc2621 1948
e501603b
TO
1949 /**
1950 * Returns if this table needs to be logged
1951 *
c3fc2621 1952 * @return bool
e501603b 1953 */
c3fc2621 1954 public function getLog() {
e501603b
TO
1955 return self::$_log;
1956 }
c3fc2621 1957
e501603b
TO
1958 /**
1959 * Returns the list of fields that can be imported
1960 *
1961 * @param bool $prefix
1962 *
1963 * @return array
1964 */
c3fc2621
CW
1965 public static function &import($prefix = FALSE) {
1966 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'event', $prefix, []);
60808919 1967 return $r;
e501603b 1968 }
c3fc2621 1969
e501603b
TO
1970 /**
1971 * Returns the list of fields that can be exported
1972 *
1973 * @param bool $prefix
1974 *
1975 * @return array
1976 */
c3fc2621
CW
1977 public static function &export($prefix = FALSE) {
1978 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'event', $prefix, []);
60808919 1979 return $r;
e501603b 1980 }
c3fc2621 1981
e7a6b91a
AS
1982 /**
1983 * Returns the list of indices
c3fc2621
CW
1984 *
1985 * @param bool $localize
1986 *
1987 * @return array
e7a6b91a
AS
1988 */
1989 public static function indices($localize = TRUE) {
c3fc2621
CW
1990 $indices = [
1991 'index_event_type_id' => [
e7a6b91a 1992 'name' => 'index_event_type_id',
c3fc2621 1993 'field' => [
e7a6b91a 1994 0 => 'event_type_id',
c3fc2621
CW
1995 ],
1996 'localizable' => FALSE,
e7a6b91a 1997 'sig' => 'civicrm_event::0::event_type_id',
c3fc2621
CW
1998 ],
1999 'index_participant_listing_id' => [
e7a6b91a 2000 'name' => 'index_participant_listing_id',
c3fc2621 2001 'field' => [
e7a6b91a 2002 0 => 'participant_listing_id',
c3fc2621
CW
2003 ],
2004 'localizable' => FALSE,
e7a6b91a 2005 'sig' => 'civicrm_event::0::participant_listing_id',
c3fc2621
CW
2006 ],
2007 'index_parent_event_id' => [
e7a6b91a 2008 'name' => 'index_parent_event_id',
c3fc2621 2009 'field' => [
e7a6b91a 2010 0 => 'parent_event_id',
c3fc2621
CW
2011 ],
2012 'localizable' => FALSE,
e7a6b91a 2013 'sig' => 'civicrm_event::0::parent_event_id',
c3fc2621
CW
2014 ],
2015 ];
e7a6b91a
AS
2016 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
2017 }
c3fc2621 2018
e501603b 2019}