commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-old / civicrm / CRM / Event / DAO / Event.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.6 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
9 | |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
18 | |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
26 */
27 /**
28 * @package CRM
29 * @copyright CiviCRM LLC (c) 2004-2015
30 *
31 * Generated from xml/schema/CRM/Event/Event.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 */
34 require_once 'CRM/Core/DAO.php';
35 require_once 'CRM/Utils/Type.php';
36 class CRM_Event_DAO_Event extends CRM_Core_DAO {
37 /**
38 * static instance to hold the table name
39 *
40 * @var string
41 */
42 static $_tableName = 'civicrm_event';
43 /**
44 * static instance to hold the field values
45 *
46 * @var array
47 */
48 static $_fields = null;
49 /**
50 * static instance to hold the keys used in $_fields for each field.
51 *
52 * @var array
53 */
54 static $_fieldKeys = null;
55 /**
56 * static instance to hold the FK relationships
57 *
58 * @var string
59 */
60 static $_links = null;
61 /**
62 * static instance to hold the values that can
63 * be imported
64 *
65 * @var array
66 */
67 static $_import = null;
68 /**
69 * static instance to hold the values that can
70 * be exported
71 *
72 * @var array
73 */
74 static $_export = null;
75 /**
76 * static value to see if we should log any modifications to
77 * this table in the civicrm_log table
78 *
79 * @var boolean
80 */
81 static $_log = true;
82 /**
83 * Event
84 *
85 * @var int unsigned
86 */
87 public $id;
88 /**
89 * Event Title (e.g. Fall Fundraiser Dinner)
90 *
91 * @var string
92 */
93 public $title;
94 /**
95 * 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.
96 *
97 * @var text
98 */
99 public $summary;
100 /**
101 * Full description of event. Text and html allowed. Displayed on built-in Event Information screens.
102 *
103 * @var text
104 */
105 public $description;
106 /**
107 * Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.
108 *
109 * @var int unsigned
110 */
111 public $event_type_id;
112 /**
113 * Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.
114 *
115 * @var int unsigned
116 */
117 public $participant_listing_id;
118 /**
119 * Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.
120 *
121 * @var boolean
122 */
123 public $is_public;
124 /**
125 * Date and time that event starts.
126 *
127 * @var datetime
128 */
129 public $start_date;
130 /**
131 * Date and time that event ends. May be NULL if no defined end date/time
132 *
133 * @var datetime
134 */
135 public $end_date;
136 /**
137 * If true, include registration link on Event Info page.
138 *
139 * @var boolean
140 */
141 public $is_online_registration;
142 /**
143 * Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.
144 *
145 * @var string
146 */
147 public $registration_link_text;
148 /**
149 * Date and time that online registration starts.
150 *
151 * @var datetime
152 */
153 public $registration_start_date;
154 /**
155 * Date and time that online registration ends.
156 *
157 * @var datetime
158 */
159 public $registration_end_date;
160 /**
161 * 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.
162 *
163 * @var int unsigned
164 */
165 public $max_participants;
166 /**
167 * 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.
168 *
169 * @var text
170 */
171 public $event_full_text;
172 /**
173 * If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.
174 *
175 * @var boolean
176 */
177 public $is_monetary;
178 /**
179 * Financial type assigned to paid event registrations for this event. Required if is_monetary is true.
180 *
181 * @var int unsigned
182 */
183 public $financial_type_id;
184 /**
185 * Payment Processors configured for this Event (if is_monetary is true)
186 *
187 * @var string
188 */
189 public $payment_processor;
190 /**
191 * Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?
192 *
193 * @var boolean
194 */
195 public $is_map;
196 /**
197 * Is this Event enabled or disabled/cancelled?
198 *
199 * @var boolean
200 */
201 public $is_active;
202 /**
203 *
204 * @var string
205 */
206 public $fee_label;
207 /**
208 * If true, show event location.
209 *
210 * @var boolean
211 */
212 public $is_show_location;
213 /**
214 * FK to Location Block ID
215 *
216 * @var int unsigned
217 */
218 public $loc_block_id;
219 /**
220 * Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.
221 *
222 * @var int unsigned
223 */
224 public $default_role_id;
225 /**
226 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
227 *
228 * @var text
229 */
230 public $intro_text;
231 /**
232 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
233 *
234 * @var text
235 */
236 public $footer_text;
237 /**
238 * Title for Confirmation page.
239 *
240 * @var string
241 */
242 public $confirm_title;
243 /**
244 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
245 *
246 * @var text
247 */
248 public $confirm_text;
249 /**
250 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
251 *
252 * @var text
253 */
254 public $confirm_footer_text;
255 /**
256 * If true, confirmation is automatically emailed to contact on successful registration.
257 *
258 * @var boolean
259 */
260 public $is_email_confirm;
261 /**
262 * text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now
263 *
264 * @var text
265 */
266 public $confirm_email_text;
267 /**
268 * FROM email name used for confirmation emails.
269 *
270 * @var string
271 */
272 public $confirm_from_name;
273 /**
274 * FROM email address used for confirmation emails.
275 *
276 * @var string
277 */
278 public $confirm_from_email;
279 /**
280 * comma-separated list of email addresses to cc each time a confirmation is sent
281 *
282 * @var string
283 */
284 public $cc_confirm;
285 /**
286 * comma-separated list of email addresses to bcc each time a confirmation is sent
287 *
288 * @var string
289 */
290 public $bcc_confirm;
291 /**
292 * FK to civicrm_option_value.
293 *
294 * @var int unsigned
295 */
296 public $default_fee_id;
297 /**
298 * FK to civicrm_option_value.
299 *
300 * @var int unsigned
301 */
302 public $default_discount_fee_id;
303 /**
304 * Title for ThankYou page.
305 *
306 * @var string
307 */
308 public $thankyou_title;
309 /**
310 * ThankYou Text.
311 *
312 * @var text
313 */
314 public $thankyou_text;
315 /**
316 * Footer message.
317 *
318 * @var text
319 */
320 public $thankyou_footer_text;
321 /**
322 * if true - allows the user to send payment directly to the org later
323 *
324 * @var boolean
325 */
326 public $is_pay_later;
327 /**
328 * The text displayed to the user in the main form
329 *
330 * @var text
331 */
332 public $pay_later_text;
333 /**
334 * The receipt sent to the user instead of the normal receipt text
335 *
336 * @var text
337 */
338 public $pay_later_receipt;
339 /**
340 * is partial payment enabled for this event
341 *
342 * @var boolean
343 */
344 public $is_partial_payment;
345 /**
346 * Initial amount label for partial payment
347 *
348 * @var string
349 */
350 public $initial_amount_label;
351 /**
352 * Initial amount help text for partial payment
353 *
354 * @var text
355 */
356 public $initial_amount_help_text;
357 /**
358 * Minimum initial amount for partial payment
359 *
360 * @var float
361 */
362 public $min_initial_amount;
363 /**
364 * if true - allows the user to register multiple participants for event
365 *
366 * @var boolean
367 */
368 public $is_multiple_registrations;
369 /**
370 * if true - allows the user to register multiple registrations from same email address.
371 *
372 * @var boolean
373 */
374 public $allow_same_participant_emails;
375 /**
376 * Whether the event has waitlist support.
377 *
378 * @var boolean
379 */
380 public $has_waitlist;
381 /**
382 * Whether participants require approval before they can finish registering.
383 *
384 * @var boolean
385 */
386 public $requires_approval;
387 /**
388 * Expire pending but unconfirmed registrations after this many hours.
389 *
390 * @var int unsigned
391 */
392 public $expiration_time;
393 /**
394 * Text to display when the event is full, but participants can signup for a waitlist.
395 *
396 * @var text
397 */
398 public $waitlist_text;
399 /**
400 * Text to display when the approval is required to complete registration for an event.
401 *
402 * @var text
403 */
404 public $approval_req_text;
405 /**
406 * whether the event has template
407 *
408 * @var boolean
409 */
410 public $is_template;
411 /**
412 * Event Template Title
413 *
414 * @var string
415 */
416 public $template_title;
417 /**
418 * FK to civicrm_contact, who created this event
419 *
420 * @var int unsigned
421 */
422 public $created_id;
423 /**
424 * Date and time that event was created.
425 *
426 * @var datetime
427 */
428 public $created_date;
429 /**
430 * 3 character string, value from config setting or input via user.
431 *
432 * @var string
433 */
434 public $currency;
435 /**
436 * The campaign for which this event has been created.
437 *
438 * @var int unsigned
439 */
440 public $campaign_id;
441 /**
442 * Can people share the event through social media?
443 *
444 * @var boolean
445 */
446 public $is_share;
447 /**
448 * If false, the event booking confirmation screen gets skipped
449 *
450 * @var boolean
451 */
452 public $is_confirm_enabled;
453 /**
454 * Implicit FK to civicrm_event: parent event
455 *
456 * @var int unsigned
457 */
458 public $parent_event_id;
459 /**
460 * Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.
461 *
462 * @var int unsigned
463 */
464 public $slot_label_id;
465 /**
466 * Rule to use when matching registrations for this event
467 *
468 * @var int unsigned
469 */
470 public $dedupe_rule_group_id;
471 /**
472 * if true than billing block is required this event
473 *
474 * @var boolean
475 */
476 public $is_billing_required;
477 /**
478 * class constructor
479 *
480 * @return civicrm_event
481 */
482 function __construct() {
483 $this->__table = 'civicrm_event';
484 parent::__construct();
485 }
486 /**
487 * Returns foreign keys and entity references
488 *
489 * @return array
490 * [CRM_Core_Reference_Interface]
491 */
492 static function getReferenceColumns() {
493 if (!self::$_links) {
494 self::$_links = static ::createReferenceColumns(__CLASS__);
495 self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'loc_block_id', 'civicrm_loc_block', 'id');
496 self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
497 self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
498 self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'dedupe_rule_group_id', 'civicrm_dedupe_rule_group', 'id');
499 }
500 return self::$_links;
501 }
502 /**
503 * Returns all the column names of this table
504 *
505 * @return array
506 */
507 static function &fields() {
508 if (!(self::$_fields)) {
509 self::$_fields = array(
510 'id' => array(
511 'name' => 'id',
512 'type' => CRM_Utils_Type::T_INT,
513 'title' => ts('Event ID') ,
514 'description' => 'Event',
515 'required' => true,
516 ) ,
517 'event_title' => array(
518 'name' => 'title',
519 'type' => CRM_Utils_Type::T_STRING,
520 'title' => ts('Event Title') ,
521 'description' => 'Event Title (e.g. Fall Fundraiser Dinner)',
522 'maxlength' => 255,
523 'size' => CRM_Utils_Type::HUGE,
524 'import' => true,
525 'where' => 'civicrm_event.title',
526 'headerPattern' => '/(event.)?title$/i',
527 'dataPattern' => '',
528 'export' => true,
529 'html' => array(
530 'type' => 'Text',
531 ) ,
532 ) ,
533 'summary' => array(
534 'name' => 'summary',
535 'type' => CRM_Utils_Type::T_TEXT,
536 'title' => ts('Event Summary') ,
537 'description' => '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.',
538 'rows' => 4,
539 'cols' => 60,
540 'html' => array(
541 'type' => 'TextArea',
542 ) ,
543 ) ,
544 'event_description' => array(
545 'name' => 'description',
546 'type' => CRM_Utils_Type::T_TEXT,
547 'title' => ts('Event Description') ,
548 'description' => 'Full description of event. Text and html allowed. Displayed on built-in Event Information screens.',
549 'rows' => 8,
550 'cols' => 60,
551 'html' => array(
552 'type' => 'TextArea',
553 ) ,
554 ) ,
555 'event_type_id' => array(
556 'name' => 'event_type_id',
557 'type' => CRM_Utils_Type::T_INT,
558 'title' => ts('Event Type') ,
559 'description' => 'Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.',
560 'html' => array(
561 'type' => 'Select',
562 ) ,
563 'pseudoconstant' => array(
564 'optionGroupName' => 'event_type',
565 'optionEditPath' => 'civicrm/admin/options/event_type',
566 )
567 ) ,
568 'participant_listing_id' => array(
569 'name' => 'participant_listing_id',
570 'type' => CRM_Utils_Type::T_INT,
571 'title' => ts('Participant Listing') ,
572 'description' => 'Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.',
573 'html' => array(
574 'type' => 'Select',
575 ) ,
576 'pseudoconstant' => array(
577 'optionGroupName' => 'participant_listing',
578 'optionEditPath' => 'civicrm/admin/options/participant_listing',
579 )
580 ) ,
581 'is_public' => array(
582 'name' => 'is_public',
583 'type' => CRM_Utils_Type::T_BOOLEAN,
584 'title' => ts('Is Event Public') ,
585 'description' => 'Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.',
586 'default' => '1',
587 'html' => array(
588 'type' => 'CheckBox',
589 ) ,
590 ) ,
591 'event_start_date' => array(
592 'name' => 'start_date',
593 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
594 'title' => ts('Event Start Date') ,
595 'description' => 'Date and time that event starts.',
596 'import' => true,
597 'where' => 'civicrm_event.start_date',
598 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
599 'dataPattern' => '',
600 'export' => true,
601 'html' => array(
602 'type' => 'Select Date',
603 ) ,
604 ) ,
605 'event_end_date' => array(
606 'name' => 'end_date',
607 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
608 'title' => ts('Event End Date') ,
609 'description' => 'Date and time that event ends. May be NULL if no defined end date/time',
610 'import' => true,
611 'where' => 'civicrm_event.end_date',
612 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
613 'dataPattern' => '',
614 'export' => true,
615 'html' => array(
616 'type' => 'Select Date',
617 ) ,
618 ) ,
619 'is_online_registration' => array(
620 'name' => 'is_online_registration',
621 'type' => CRM_Utils_Type::T_BOOLEAN,
622 'title' => ts('Is Online Registration') ,
623 'description' => 'If true, include registration link on Event Info page.',
624 'html' => array(
625 'type' => 'CheckBox',
626 ) ,
627 ) ,
628 'registration_link_text' => array(
629 'name' => 'registration_link_text',
630 'type' => CRM_Utils_Type::T_STRING,
631 'title' => ts('Event Registration Link Text') ,
632 'description' => 'Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.',
633 'maxlength' => 255,
634 'size' => CRM_Utils_Type::HUGE,
635 'html' => array(
636 'type' => 'Text',
637 ) ,
638 ) ,
639 'registration_start_date' => array(
640 'name' => 'registration_start_date',
641 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
642 'title' => ts('Registration Start Date') ,
643 'description' => 'Date and time that online registration starts.',
644 'html' => array(
645 'type' => 'Select Date',
646 ) ,
647 ) ,
648 'registration_end_date' => array(
649 'name' => 'registration_end_date',
650 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
651 'title' => ts('Registration End Date') ,
652 'description' => 'Date and time that online registration ends.',
653 'html' => array(
654 'type' => 'Select Date',
655 ) ,
656 ) ,
657 'max_participants' => array(
658 'name' => 'max_participants',
659 'type' => CRM_Utils_Type::T_INT,
660 'title' => ts('Max Participants') ,
661 'description' => '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.',
662 'default' => 'NULL',
663 'html' => array(
664 'type' => 'Text',
665 ) ,
666 ) ,
667 'event_full_text' => array(
668 'name' => 'event_full_text',
669 'type' => CRM_Utils_Type::T_TEXT,
670 'title' => ts('Event Information') ,
671 'description' => '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.',
672 'rows' => 4,
673 'cols' => 60,
674 'html' => array(
675 'type' => 'TextArea',
676 ) ,
677 ) ,
678 'is_monetary' => array(
679 'name' => 'is_monetary',
680 'type' => CRM_Utils_Type::T_BOOLEAN,
681 'title' => ts('Is this a PAID event?') ,
682 'description' => 'If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.',
683 'html' => array(
684 'type' => 'CheckBox',
685 ) ,
686 ) ,
687 'financial_type_id' => array(
688 'name' => 'financial_type_id',
689 'type' => CRM_Utils_Type::T_INT,
690 'title' => ts('Financial Type') ,
691 'description' => 'Financial type assigned to paid event registrations for this event. Required if is_monetary is true.',
692 'default' => 'NULL',
693 'html' => array(
694 'type' => 'Select',
695 ) ,
696 'pseudoconstant' => array(
697 'table' => 'civicrm_financial_type',
698 'keyColumn' => 'id',
699 'labelColumn' => 'name',
700 )
701 ) ,
702 'payment_processor' => array(
703 'name' => 'payment_processor',
704 'type' => CRM_Utils_Type::T_STRING,
705 'title' => ts('Payment Processor') ,
706 'description' => 'Payment Processors configured for this Event (if is_monetary is true)',
707 'maxlength' => 128,
708 'size' => CRM_Utils_Type::HUGE,
709 'html' => array(
710 'type' => 'Select',
711 ) ,
712 'pseudoconstant' => array(
713 'table' => 'civicrm_payment_processor',
714 'keyColumn' => 'id',
715 'labelColumn' => 'name',
716 )
717 ) ,
718 'is_map' => array(
719 'name' => 'is_map',
720 'type' => CRM_Utils_Type::T_BOOLEAN,
721 'title' => ts('Map Enabled') ,
722 'description' => 'Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?',
723 'html' => array(
724 'type' => 'CheckBox',
725 ) ,
726 ) ,
727 'is_active' => array(
728 'name' => 'is_active',
729 'type' => CRM_Utils_Type::T_BOOLEAN,
730 'title' => ts('Is Active') ,
731 'description' => 'Is this Event enabled or disabled/cancelled?',
732 'html' => array(
733 'type' => 'CheckBox',
734 ) ,
735 ) ,
736 'fee_label' => array(
737 'name' => 'fee_label',
738 'type' => CRM_Utils_Type::T_STRING,
739 'title' => ts('Fee Label') ,
740 'maxlength' => 255,
741 'size' => CRM_Utils_Type::HUGE,
742 'import' => true,
743 'where' => 'civicrm_event.fee_label',
744 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
745 'dataPattern' => '',
746 'export' => true,
747 'html' => array(
748 'type' => 'Text',
749 ) ,
750 ) ,
751 'is_show_location' => array(
752 'name' => 'is_show_location',
753 'type' => CRM_Utils_Type::T_BOOLEAN,
754 'title' => ts('show location') ,
755 'description' => 'If true, show event location.',
756 'default' => '1',
757 'html' => array(
758 'type' => 'CheckBox',
759 ) ,
760 ) ,
761 'loc_block_id' => array(
762 'name' => 'loc_block_id',
763 'type' => CRM_Utils_Type::T_INT,
764 'title' => ts('Location Block ID') ,
765 'description' => 'FK to Location Block ID',
766 'FKClassName' => 'CRM_Core_DAO_LocBlock',
767 ) ,
768 'default_role_id' => array(
769 'name' => 'default_role_id',
770 'type' => CRM_Utils_Type::T_INT,
771 'title' => ts('Default Role ID') ,
772 'description' => 'Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.',
773 'import' => true,
774 'where' => 'civicrm_event.default_role_id',
775 'headerPattern' => '',
776 'dataPattern' => '',
777 'export' => true,
778 'default' => '1',
779 'html' => array(
780 'type' => 'Select',
781 ) ,
782 'pseudoconstant' => array(
783 'optionGroupName' => 'participant_role',
784 'optionEditPath' => 'civicrm/admin/options/participant_role',
785 )
786 ) ,
787 'intro_text' => array(
788 'name' => 'intro_text',
789 'type' => CRM_Utils_Type::T_TEXT,
790 'title' => ts('Introductory Message') ,
791 'description' => 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
792 'rows' => 6,
793 'cols' => 50,
794 'html' => array(
795 'type' => 'TextArea',
796 ) ,
797 ) ,
798 'footer_text' => array(
799 'name' => 'footer_text',
800 'type' => CRM_Utils_Type::T_TEXT,
801 'title' => ts('Footer Message') ,
802 'description' => 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
803 'rows' => 6,
804 'cols' => 50,
805 'html' => array(
806 'type' => 'TextArea',
807 ) ,
808 ) ,
809 'confirm_title' => array(
810 'name' => 'confirm_title',
811 'type' => CRM_Utils_Type::T_STRING,
812 'title' => ts('Confirmation Title') ,
813 'description' => 'Title for Confirmation page.',
814 'maxlength' => 255,
815 'size' => CRM_Utils_Type::HUGE,
816 'default' => 'NULL',
817 'html' => array(
818 'type' => 'Text',
819 ) ,
820 ) ,
821 'confirm_text' => array(
822 'name' => 'confirm_text',
823 'type' => CRM_Utils_Type::T_TEXT,
824 'title' => ts('Confirm Text') ,
825 'description' => 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
826 'rows' => 6,
827 'cols' => 50,
828 'html' => array(
829 'type' => 'TextArea',
830 ) ,
831 ) ,
832 'confirm_footer_text' => array(
833 'name' => 'confirm_footer_text',
834 'type' => CRM_Utils_Type::T_TEXT,
835 'title' => ts('Footer Text') ,
836 'description' => 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
837 'rows' => 6,
838 'cols' => 50,
839 'html' => array(
840 'type' => 'TextArea',
841 ) ,
842 ) ,
843 'is_email_confirm' => array(
844 'name' => 'is_email_confirm',
845 'type' => CRM_Utils_Type::T_BOOLEAN,
846 'title' => ts('Is confirm email') ,
847 'description' => 'If true, confirmation is automatically emailed to contact on successful registration.',
848 'html' => array(
849 'type' => 'CheckBox',
850 ) ,
851 ) ,
852 'confirm_email_text' => array(
853 'name' => 'confirm_email_text',
854 'type' => CRM_Utils_Type::T_TEXT,
855 'title' => ts('Confirmation Email Text') ,
856 'description' => 'text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now',
857 'rows' => 4,
858 'cols' => 50,
859 'html' => array(
860 'type' => 'TextArea',
861 ) ,
862 ) ,
863 'confirm_from_name' => array(
864 'name' => 'confirm_from_name',
865 'type' => CRM_Utils_Type::T_STRING,
866 'title' => ts('Confirm From Name') ,
867 'description' => 'FROM email name used for confirmation emails.',
868 'maxlength' => 255,
869 'size' => CRM_Utils_Type::HUGE,
870 'html' => array(
871 'type' => 'Text',
872 ) ,
873 ) ,
874 'confirm_from_email' => array(
875 'name' => 'confirm_from_email',
876 'type' => CRM_Utils_Type::T_STRING,
877 'title' => ts('Confirm From Email') ,
878 'description' => 'FROM email address used for confirmation emails.',
879 'maxlength' => 255,
880 'size' => CRM_Utils_Type::HUGE,
881 'html' => array(
882 'type' => 'Text',
883 ) ,
884 ) ,
885 'cc_confirm' => array(
886 'name' => 'cc_confirm',
887 'type' => CRM_Utils_Type::T_STRING,
888 'title' => ts('Cc Confirm') ,
889 'description' => 'comma-separated list of email addresses to cc each time a confirmation is sent',
890 'maxlength' => 255,
891 'size' => CRM_Utils_Type::HUGE,
892 'html' => array(
893 'type' => 'Text',
894 ) ,
895 ) ,
896 'bcc_confirm' => array(
897 'name' => 'bcc_confirm',
898 'type' => CRM_Utils_Type::T_STRING,
899 'title' => ts('Bcc Confirm') ,
900 'description' => 'comma-separated list of email addresses to bcc each time a confirmation is sent',
901 'maxlength' => 255,
902 'size' => CRM_Utils_Type::HUGE,
903 'html' => array(
904 'type' => 'Text',
905 ) ,
906 ) ,
907 'default_fee_id' => array(
908 'name' => 'default_fee_id',
909 'type' => CRM_Utils_Type::T_INT,
910 'title' => ts('Default Fee ID') ,
911 'description' => 'FK to civicrm_option_value.',
912 ) ,
913 'default_discount_fee_id' => array(
914 'name' => 'default_discount_fee_id',
915 'type' => CRM_Utils_Type::T_INT,
916 'title' => ts('Default Discount Fee ID') ,
917 'description' => 'FK to civicrm_option_value.',
918 ) ,
919 'thankyou_title' => array(
920 'name' => 'thankyou_title',
921 'type' => CRM_Utils_Type::T_STRING,
922 'title' => ts('ThankYou Title') ,
923 'description' => 'Title for ThankYou page.',
924 'maxlength' => 255,
925 'size' => CRM_Utils_Type::HUGE,
926 'default' => 'NULL',
927 'html' => array(
928 'type' => 'Text',
929 ) ,
930 ) ,
931 'thankyou_text' => array(
932 'name' => 'thankyou_text',
933 'type' => CRM_Utils_Type::T_TEXT,
934 'title' => ts('ThankYou Text') ,
935 'description' => 'ThankYou Text.',
936 'rows' => 6,
937 'cols' => 50,
938 'html' => array(
939 'type' => 'TextArea',
940 ) ,
941 ) ,
942 'thankyou_footer_text' => array(
943 'name' => 'thankyou_footer_text',
944 'type' => CRM_Utils_Type::T_TEXT,
945 'title' => ts('Footer Text') ,
946 'description' => 'Footer message.',
947 'rows' => 6,
948 'cols' => 50,
949 'html' => array(
950 'type' => 'TextArea',
951 ) ,
952 ) ,
953 'is_pay_later' => array(
954 'name' => 'is_pay_later',
955 'type' => CRM_Utils_Type::T_BOOLEAN,
956 'title' => ts('Pay Later Allowed') ,
957 'description' => 'if true - allows the user to send payment directly to the org later',
958 'html' => array(
959 'type' => 'CheckBox',
960 ) ,
961 ) ,
962 'pay_later_text' => array(
963 'name' => 'pay_later_text',
964 'type' => CRM_Utils_Type::T_TEXT,
965 'title' => ts('Pay Later Text') ,
966 'description' => 'The text displayed to the user in the main form',
967 'html' => array(
968 'type' => 'Text',
969 ) ,
970 ) ,
971 'pay_later_receipt' => array(
972 'name' => 'pay_later_receipt',
973 'type' => CRM_Utils_Type::T_TEXT,
974 'title' => ts('Pay Later Receipt Text') ,
975 'description' => 'The receipt sent to the user instead of the normal receipt text',
976 'html' => array(
977 'type' => 'Text',
978 ) ,
979 ) ,
980 'is_partial_payment' => array(
981 'name' => 'is_partial_payment',
982 'type' => CRM_Utils_Type::T_BOOLEAN,
983 'title' => ts('Partial Payments Enabled') ,
984 'description' => 'is partial payment enabled for this event',
985 'html' => array(
986 'type' => 'CheckBox',
987 ) ,
988 ) ,
989 'initial_amount_label' => array(
990 'name' => 'initial_amount_label',
991 'type' => CRM_Utils_Type::T_STRING,
992 'title' => ts('Initial Amount Label') ,
993 'description' => 'Initial amount label for partial payment',
994 'maxlength' => 255,
995 'size' => CRM_Utils_Type::HUGE,
996 'html' => array(
997 'type' => 'Text',
998 ) ,
999 ) ,
1000 'initial_amount_help_text' => array(
1001 'name' => 'initial_amount_help_text',
1002 'type' => CRM_Utils_Type::T_TEXT,
1003 'title' => ts('Initial Amount Help Text') ,
1004 'description' => 'Initial amount help text for partial payment',
1005 'html' => array(
1006 'type' => 'Text',
1007 ) ,
1008 ) ,
1009 'min_initial_amount' => array(
1010 'name' => 'min_initial_amount',
1011 'type' => CRM_Utils_Type::T_MONEY,
1012 'title' => ts('Minimum Initial Amount') ,
1013 'description' => 'Minimum initial amount for partial payment',
1014 'precision' => array(
1015 20,
1016 2
1017 ) ,
1018 'html' => array(
1019 'type' => 'Text',
1020 ) ,
1021 ) ,
1022 'is_multiple_registrations' => array(
1023 'name' => 'is_multiple_registrations',
1024 'type' => CRM_Utils_Type::T_BOOLEAN,
1025 'title' => ts('Allow Multiple Registrations') ,
1026 'description' => 'if true - allows the user to register multiple participants for event',
1027 'html' => array(
1028 'type' => 'CheckBox',
1029 ) ,
1030 ) ,
1031 'allow_same_participant_emails' => array(
1032 'name' => 'allow_same_participant_emails',
1033 'type' => CRM_Utils_Type::T_BOOLEAN,
1034 'title' => ts('Does Event allow multiple registrations from same email address?') ,
1035 'description' => 'if true - allows the user to register multiple registrations from same email address.',
1036 'html' => array(
1037 'type' => 'CheckBox',
1038 ) ,
1039 ) ,
1040 'has_waitlist' => array(
1041 'name' => 'has_waitlist',
1042 'type' => CRM_Utils_Type::T_BOOLEAN,
1043 'title' => ts('Waitlist Enabled') ,
1044 'description' => 'Whether the event has waitlist support.',
1045 'html' => array(
1046 'type' => 'CheckBox',
1047 ) ,
1048 ) ,
1049 'requires_approval' => array(
1050 'name' => 'requires_approval',
1051 'type' => CRM_Utils_Type::T_BOOLEAN,
1052 'title' => ts('Requires Approval') ,
1053 'description' => 'Whether participants require approval before they can finish registering.',
1054 'html' => array(
1055 'type' => 'CheckBox',
1056 ) ,
1057 ) ,
1058 'expiration_time' => array(
1059 'name' => 'expiration_time',
1060 'type' => CRM_Utils_Type::T_INT,
1061 'title' => ts('Expiration Time') ,
1062 'description' => 'Expire pending but unconfirmed registrations after this many hours.',
1063 'html' => array(
1064 'type' => 'Text',
1065 ) ,
1066 ) ,
1067 'waitlist_text' => array(
1068 'name' => 'waitlist_text',
1069 'type' => CRM_Utils_Type::T_TEXT,
1070 'title' => ts('Waitlist Text') ,
1071 'description' => 'Text to display when the event is full, but participants can signup for a waitlist.',
1072 'rows' => 4,
1073 'cols' => 60,
1074 'html' => array(
1075 'type' => 'TextArea',
1076 ) ,
1077 ) ,
1078 'approval_req_text' => array(
1079 'name' => 'approval_req_text',
1080 'type' => CRM_Utils_Type::T_TEXT,
1081 'title' => ts('Approval Req Text') ,
1082 'description' => 'Text to display when the approval is required to complete registration for an event.',
1083 'rows' => 4,
1084 'cols' => 60,
1085 'html' => array(
1086 'type' => 'TextArea',
1087 ) ,
1088 ) ,
1089 'is_template' => array(
1090 'name' => 'is_template',
1091 'type' => CRM_Utils_Type::T_BOOLEAN,
1092 'title' => ts('Is an Event Template') ,
1093 'description' => 'whether the event has template',
1094 'required' => true,
1095 'html' => array(
1096 'type' => 'CheckBox',
1097 ) ,
1098 ) ,
1099 'template_title' => array(
1100 'name' => 'template_title',
1101 'type' => CRM_Utils_Type::T_STRING,
1102 'title' => ts('Event Template Title') ,
1103 'description' => 'Event Template Title',
1104 'maxlength' => 255,
1105 'size' => CRM_Utils_Type::HUGE,
1106 'import' => true,
1107 'where' => 'civicrm_event.template_title',
1108 'headerPattern' => '/(template.)?title$/i',
1109 'dataPattern' => '',
1110 'export' => true,
1111 'html' => array(
1112 'type' => 'Text',
1113 ) ,
1114 ) ,
1115 'created_id' => array(
1116 'name' => 'created_id',
1117 'type' => CRM_Utils_Type::T_INT,
1118 'title' => ts('Created By Contact ID') ,
1119 'description' => 'FK to civicrm_contact, who created this event',
1120 'FKClassName' => 'CRM_Contact_DAO_Contact',
1121 ) ,
1122 'created_date' => array(
1123 'name' => 'created_date',
1124 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
1125 'title' => ts('Event Created Date') ,
1126 'description' => 'Date and time that event was created.',
1127 ) ,
1128 'currency' => array(
1129 'name' => 'currency',
1130 'type' => CRM_Utils_Type::T_STRING,
1131 'title' => ts('Currency') ,
1132 'description' => '3 character string, value from config setting or input via user.',
1133 'maxlength' => 3,
1134 'size' => CRM_Utils_Type::FOUR,
1135 'import' => true,
1136 'where' => 'civicrm_event.currency',
1137 'headerPattern' => '/cur(rency)?/i',
1138 'dataPattern' => '/^[A-Z]{3}$/i',
1139 'export' => true,
1140 'html' => array(
1141 'type' => 'Select',
1142 ) ,
1143 'pseudoconstant' => array(
1144 'table' => 'civicrm_currency',
1145 'keyColumn' => 'name',
1146 'labelColumn' => 'full_name',
1147 'nameColumn' => 'numeric_code',
1148 )
1149 ) ,
1150 'campaign_id' => array(
1151 'name' => 'campaign_id',
1152 'type' => CRM_Utils_Type::T_INT,
1153 'title' => ts('Campaign') ,
1154 'description' => 'The campaign for which this event has been created.',
1155 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1156 'html' => array(
1157 'type' => 'Autocomplete-Select',
1158 ) ,
1159 'pseudoconstant' => array(
1160 'table' => 'civicrm_campaign',
1161 'keyColumn' => 'id',
1162 'labelColumn' => 'title',
1163 )
1164 ) ,
1165 'is_share' => array(
1166 'name' => 'is_share',
1167 'type' => CRM_Utils_Type::T_BOOLEAN,
1168 'title' => ts('Is shared through social media') ,
1169 'description' => 'Can people share the event through social media?',
1170 'default' => '1',
1171 'html' => array(
1172 'type' => 'CheckBox',
1173 ) ,
1174 ) ,
1175 'is_confirm_enabled' => array(
1176 'name' => 'is_confirm_enabled',
1177 'type' => CRM_Utils_Type::T_BOOLEAN,
1178 'title' => ts('Is the booking confirmation screen enabled?') ,
1179 'description' => 'If false, the event booking confirmation screen gets skipped',
1180 'default' => '1',
1181 'html' => array(
1182 'type' => 'CheckBox',
1183 ) ,
1184 ) ,
1185 'parent_event_id' => array(
1186 'name' => 'parent_event_id',
1187 'type' => CRM_Utils_Type::T_INT,
1188 'title' => ts('Parent Event ID') ,
1189 'description' => 'Implicit FK to civicrm_event: parent event',
1190 'default' => 'NULL',
1191 'html' => array(
1192 'type' => 'Autocomplete-Select',
1193 ) ,
1194 ) ,
1195 'slot_label_id' => array(
1196 'name' => 'slot_label_id',
1197 'type' => CRM_Utils_Type::T_INT,
1198 'title' => ts('Subevent Slot Label ID') ,
1199 'description' => 'Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.',
1200 'default' => 'NULL',
1201 'html' => array(
1202 'type' => 'Select',
1203 ) ,
1204 ) ,
1205 'dedupe_rule_group_id' => array(
1206 'name' => 'dedupe_rule_group_id',
1207 'type' => CRM_Utils_Type::T_INT,
1208 'title' => ts('Dedupe Rule') ,
1209 'description' => 'Rule to use when matching registrations for this event',
1210 'default' => 'NULL',
1211 'FKClassName' => 'CRM_Dedupe_DAO_RuleGroup',
1212 'html' => array(
1213 'type' => 'Select',
1214 ) ,
1215 'pseudoconstant' => array(
1216 'table' => 'civicrm_dedupe_rule_group',
1217 'keyColumn' => 'id',
1218 'labelColumn' => 'title',
1219 'nameColumn' => 'name',
1220 )
1221 ) ,
1222 'is_billing_required' => array(
1223 'name' => 'is_billing_required',
1224 'type' => CRM_Utils_Type::T_BOOLEAN,
1225 'title' => ts('Is billing block required') ,
1226 'description' => 'if true than billing block is required this event',
1227 'html' => array(
1228 'type' => 'CheckBox',
1229 ) ,
1230 ) ,
1231 );
1232 }
1233 return self::$_fields;
1234 }
1235 /**
1236 * Returns an array containing, for each field, the arary key used for that
1237 * field in self::$_fields.
1238 *
1239 * @return array
1240 */
1241 static function &fieldKeys() {
1242 if (!(self::$_fieldKeys)) {
1243 self::$_fieldKeys = array(
1244 'id' => 'id',
1245 'title' => 'event_title',
1246 'summary' => 'summary',
1247 'description' => 'event_description',
1248 'event_type_id' => 'event_type_id',
1249 'participant_listing_id' => 'participant_listing_id',
1250 'is_public' => 'is_public',
1251 'start_date' => 'event_start_date',
1252 'end_date' => 'event_end_date',
1253 'is_online_registration' => 'is_online_registration',
1254 'registration_link_text' => 'registration_link_text',
1255 'registration_start_date' => 'registration_start_date',
1256 'registration_end_date' => 'registration_end_date',
1257 'max_participants' => 'max_participants',
1258 'event_full_text' => 'event_full_text',
1259 'is_monetary' => 'is_monetary',
1260 'financial_type_id' => 'financial_type_id',
1261 'payment_processor' => 'payment_processor',
1262 'is_map' => 'is_map',
1263 'is_active' => 'is_active',
1264 'fee_label' => 'fee_label',
1265 'is_show_location' => 'is_show_location',
1266 'loc_block_id' => 'loc_block_id',
1267 'default_role_id' => 'default_role_id',
1268 'intro_text' => 'intro_text',
1269 'footer_text' => 'footer_text',
1270 'confirm_title' => 'confirm_title',
1271 'confirm_text' => 'confirm_text',
1272 'confirm_footer_text' => 'confirm_footer_text',
1273 'is_email_confirm' => 'is_email_confirm',
1274 'confirm_email_text' => 'confirm_email_text',
1275 'confirm_from_name' => 'confirm_from_name',
1276 'confirm_from_email' => 'confirm_from_email',
1277 'cc_confirm' => 'cc_confirm',
1278 'bcc_confirm' => 'bcc_confirm',
1279 'default_fee_id' => 'default_fee_id',
1280 'default_discount_fee_id' => 'default_discount_fee_id',
1281 'thankyou_title' => 'thankyou_title',
1282 'thankyou_text' => 'thankyou_text',
1283 'thankyou_footer_text' => 'thankyou_footer_text',
1284 'is_pay_later' => 'is_pay_later',
1285 'pay_later_text' => 'pay_later_text',
1286 'pay_later_receipt' => 'pay_later_receipt',
1287 'is_partial_payment' => 'is_partial_payment',
1288 'initial_amount_label' => 'initial_amount_label',
1289 'initial_amount_help_text' => 'initial_amount_help_text',
1290 'min_initial_amount' => 'min_initial_amount',
1291 'is_multiple_registrations' => 'is_multiple_registrations',
1292 'allow_same_participant_emails' => 'allow_same_participant_emails',
1293 'has_waitlist' => 'has_waitlist',
1294 'requires_approval' => 'requires_approval',
1295 'expiration_time' => 'expiration_time',
1296 'waitlist_text' => 'waitlist_text',
1297 'approval_req_text' => 'approval_req_text',
1298 'is_template' => 'is_template',
1299 'template_title' => 'template_title',
1300 'created_id' => 'created_id',
1301 'created_date' => 'created_date',
1302 'currency' => 'currency',
1303 'campaign_id' => 'campaign_id',
1304 'is_share' => 'is_share',
1305 'is_confirm_enabled' => 'is_confirm_enabled',
1306 'parent_event_id' => 'parent_event_id',
1307 'slot_label_id' => 'slot_label_id',
1308 'dedupe_rule_group_id' => 'dedupe_rule_group_id',
1309 'is_billing_required' => 'is_billing_required',
1310 );
1311 }
1312 return self::$_fieldKeys;
1313 }
1314 /**
1315 * Returns the names of this table
1316 *
1317 * @return string
1318 */
1319 static function getTableName() {
1320 return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
1321 }
1322 /**
1323 * Returns if this table needs to be logged
1324 *
1325 * @return boolean
1326 */
1327 function getLog() {
1328 return self::$_log;
1329 }
1330 /**
1331 * Returns the list of fields that can be imported
1332 *
1333 * @param bool $prefix
1334 *
1335 * @return array
1336 */
1337 static function &import($prefix = false) {
1338 if (!(self::$_import)) {
1339 self::$_import = array();
1340 $fields = self::fields();
1341 foreach($fields as $name => $field) {
1342 if (CRM_Utils_Array::value('import', $field)) {
1343 if ($prefix) {
1344 self::$_import['event'] = & $fields[$name];
1345 } else {
1346 self::$_import[$name] = & $fields[$name];
1347 }
1348 }
1349 }
1350 }
1351 return self::$_import;
1352 }
1353 /**
1354 * Returns the list of fields that can be exported
1355 *
1356 * @param bool $prefix
1357 *
1358 * @return array
1359 */
1360 static function &export($prefix = false) {
1361 if (!(self::$_export)) {
1362 self::$_export = array();
1363 $fields = self::fields();
1364 foreach($fields as $name => $field) {
1365 if (CRM_Utils_Array::value('export', $field)) {
1366 if ($prefix) {
1367 self::$_export['event'] = & $fields[$name];
1368 } else {
1369 self::$_export[$name] = & $fields[$name];
1370 }
1371 }
1372 }
1373 }
1374 return self::$_export;
1375 }
1376 }