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