3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.6 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2015
31 * Generated from xml/schema/CRM/Event/Event.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
34 require_once 'CRM/Core/DAO.php';
35 require_once 'CRM/Utils/Type.php';
36 class CRM_Event_DAO_Event
extends CRM_Core_DAO
{
38 * static instance to hold the table name
42 static $_tableName = 'civicrm_event';
44 * static instance to hold the field values
48 static $_fields = null;
50 * static instance to hold the keys used in $_fields for each field.
54 static $_fieldKeys = null;
56 * static instance to hold the FK relationships
60 static $_links = null;
62 * static instance to hold the values that can
67 static $_import = null;
69 * static instance to hold the values that can
74 static $_export = null;
76 * static value to see if we should log any modifications to
77 * this table in the civicrm_log table
89 * Event Title (e.g. Fall Fundraiser Dinner)
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.
101 * Full description of event. Text and html allowed. Displayed on built-in Event Information screens.
107 * Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.
111 public $event_type_id;
113 * Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.
117 public $participant_listing_id;
119 * Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.
125 * Date and time that event starts.
131 * Date and time that event ends. May be NULL if no defined end date/time
137 * If true, include registration link on Event Info page.
141 public $is_online_registration;
143 * Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.
147 public $registration_link_text;
149 * Date and time that online registration starts.
153 public $registration_start_date;
155 * Date and time that online registration ends.
159 public $registration_end_date;
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.
165 public $max_participants;
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.
171 public $event_full_text;
173 * If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.
179 * Financial type assigned to paid event registrations for this event. Required if is_monetary is true.
183 public $financial_type_id;
185 * Payment Processors configured for this Event (if is_monetary is true)
189 public $payment_processor;
191 * Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?
197 * Is this Event enabled or disabled/cancelled?
208 * If true, show event location.
212 public $is_show_location;
214 * FK to Location Block ID
218 public $loc_block_id;
220 * Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.
224 public $default_role_id;
226 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
232 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
238 * Title for Confirmation page.
242 public $confirm_title;
244 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
248 public $confirm_text;
250 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
254 public $confirm_footer_text;
256 * If true, confirmation is automatically emailed to contact on successful registration.
260 public $is_email_confirm;
262 * text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now
266 public $confirm_email_text;
268 * FROM email name used for confirmation emails.
272 public $confirm_from_name;
274 * FROM email address used for confirmation emails.
278 public $confirm_from_email;
280 * comma-separated list of email addresses to cc each time a confirmation is sent
286 * comma-separated list of email addresses to bcc each time a confirmation is sent
292 * FK to civicrm_option_value.
296 public $default_fee_id;
298 * FK to civicrm_option_value.
302 public $default_discount_fee_id;
304 * Title for ThankYou page.
308 public $thankyou_title;
314 public $thankyou_text;
320 public $thankyou_footer_text;
322 * if true - allows the user to send payment directly to the org later
326 public $is_pay_later;
328 * The text displayed to the user in the main form
332 public $pay_later_text;
334 * The receipt sent to the user instead of the normal receipt text
338 public $pay_later_receipt;
340 * is partial payment enabled for this event
344 public $is_partial_payment;
346 * Initial amount label for partial payment
350 public $initial_amount_label;
352 * Initial amount help text for partial payment
356 public $initial_amount_help_text;
358 * Minimum initial amount for partial payment
362 public $min_initial_amount;
364 * if true - allows the user to register multiple participants for event
368 public $is_multiple_registrations;
370 * if true - allows the user to register multiple registrations from same email address.
374 public $allow_same_participant_emails;
376 * Whether the event has waitlist support.
380 public $has_waitlist;
382 * Whether participants require approval before they can finish registering.
386 public $requires_approval;
388 * Expire pending but unconfirmed registrations after this many hours.
392 public $expiration_time;
394 * Text to display when the event is full, but participants can signup for a waitlist.
398 public $waitlist_text;
400 * Text to display when the approval is required to complete registration for an event.
404 public $approval_req_text;
406 * whether the event has template
412 * Event Template Title
416 public $template_title;
418 * FK to civicrm_contact, who created this event
424 * Date and time that event was created.
428 public $created_date;
430 * 3 character string, value from config setting or input via user.
436 * The campaign for which this event has been created.
442 * Can people share the event through social media?
448 * If false, the event booking confirmation screen gets skipped
452 public $is_confirm_enabled;
454 * Implicit FK to civicrm_event: parent event
458 public $parent_event_id;
460 * Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.
464 public $slot_label_id;
466 * Rule to use when matching registrations for this event
470 public $dedupe_rule_group_id;
472 * if true than billing block is required this event
476 public $is_billing_required;
480 * @return civicrm_event
482 function __construct() {
483 $this->__table
= 'civicrm_event';
484 parent
::__construct();
487 * Returns foreign keys and entity references
490 * [CRM_Core_Reference_Interface]
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');
500 return self
::$_links;
503 * Returns all the column names of this table
507 static function &fields() {
508 if (!(self
::$_fields)) {
509 self
::$_fields = array(
512 'type' => CRM_Utils_Type
::T_INT
,
513 'title' => ts('Event ID') ,
514 'description' => 'Event',
517 'event_title' => array(
519 'type' => CRM_Utils_Type
::T_STRING
,
520 'title' => ts('Event Title') ,
521 'description' => 'Event Title (e.g. Fall Fundraiser Dinner)',
523 'size' => CRM_Utils_Type
::HUGE
,
525 'where' => 'civicrm_event.title',
526 'headerPattern' => '/(event.)?title$/i',
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.',
541 'type' => 'TextArea',
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.',
552 'type' => 'TextArea',
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.',
563 'pseudoconstant' => array(
564 'optionGroupName' => 'event_type',
565 'optionEditPath' => 'civicrm/admin/options/event_type',
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.',
576 'pseudoconstant' => array(
577 'optionGroupName' => 'participant_listing',
578 'optionEditPath' => 'civicrm/admin/options/participant_listing',
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.',
588 'type' => 'CheckBox',
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.',
597 'where' => 'civicrm_event.start_date',
598 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
602 'type' => 'Select Date',
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',
611 'where' => 'civicrm_event.end_date',
612 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
616 'type' => 'Select Date',
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.',
625 'type' => 'CheckBox',
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.',
634 'size' => CRM_Utils_Type
::HUGE
,
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.',
645 'type' => 'Select Date',
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.',
654 'type' => 'Select Date',
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.',
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.',
675 'type' => 'TextArea',
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.',
684 'type' => 'CheckBox',
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.',
696 'pseudoconstant' => array(
697 'table' => 'civicrm_financial_type',
699 'labelColumn' => 'name',
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)',
708 'size' => CRM_Utils_Type
::HUGE
,
712 'pseudoconstant' => array(
713 'table' => 'civicrm_payment_processor',
715 'labelColumn' => 'name',
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?',
724 'type' => 'CheckBox',
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?',
733 'type' => 'CheckBox',
736 'fee_label' => array(
737 'name' => 'fee_label',
738 'type' => CRM_Utils_Type
::T_STRING
,
739 'title' => ts('Fee Label') ,
741 'size' => CRM_Utils_Type
::HUGE
,
743 'where' => 'civicrm_event.fee_label',
744 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
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.',
758 'type' => 'CheckBox',
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',
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.',
774 'where' => 'civicrm_event.default_role_id',
775 'headerPattern' => '',
782 'pseudoconstant' => array(
783 'optionGroupName' => 'participant_role',
784 'optionEditPath' => 'civicrm/admin/options/participant_role',
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.',
795 'type' => 'TextArea',
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.',
806 'type' => 'TextArea',
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.',
815 'size' => CRM_Utils_Type
::HUGE
,
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.',
829 'type' => 'TextArea',
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.',
840 'type' => 'TextArea',
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.',
849 'type' => 'CheckBox',
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',
860 'type' => 'TextArea',
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.',
869 'size' => CRM_Utils_Type
::HUGE
,
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.',
880 'size' => CRM_Utils_Type
::HUGE
,
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',
891 'size' => CRM_Utils_Type
::HUGE
,
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',
902 'size' => CRM_Utils_Type
::HUGE
,
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.',
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.',
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.',
925 'size' => CRM_Utils_Type
::HUGE
,
931 'thankyou_text' => array(
932 'name' => 'thankyou_text',
933 'type' => CRM_Utils_Type
::T_TEXT
,
934 'title' => ts('ThankYou Text') ,
935 'description' => 'ThankYou Text.',
939 'type' => 'TextArea',
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.',
950 'type' => 'TextArea',
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',
959 'type' => 'CheckBox',
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',
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',
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',
986 'type' => 'CheckBox',
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',
995 'size' => CRM_Utils_Type
::HUGE
,
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',
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(
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',
1028 'type' => 'CheckBox',
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.',
1037 'type' => 'CheckBox',
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.',
1046 'type' => 'CheckBox',
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.',
1055 'type' => 'CheckBox',
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.',
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.',
1075 'type' => 'TextArea',
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.',
1086 'type' => 'TextArea',
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',
1096 'type' => 'CheckBox',
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',
1105 'size' => CRM_Utils_Type
::HUGE
,
1107 'where' => 'civicrm_event.template_title',
1108 'headerPattern' => '/(template.)?title$/i',
1109 'dataPattern' => '',
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',
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.',
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.',
1134 'size' => CRM_Utils_Type
::FOUR
,
1136 'where' => 'civicrm_event.currency',
1137 'headerPattern' => '/cur(rency)?/i',
1138 'dataPattern' => '/^[A-Z]{3}$/i',
1143 'pseudoconstant' => array(
1144 'table' => 'civicrm_currency',
1145 'keyColumn' => 'name',
1146 'labelColumn' => 'full_name',
1147 'nameColumn' => 'numeric_code',
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',
1157 'type' => 'Autocomplete-Select',
1159 'pseudoconstant' => array(
1160 'table' => 'civicrm_campaign',
1161 'keyColumn' => 'id',
1162 'labelColumn' => 'title',
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?',
1172 'type' => 'CheckBox',
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',
1182 'type' => 'CheckBox',
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',
1192 'type' => 'Autocomplete-Select',
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',
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',
1215 'pseudoconstant' => array(
1216 'table' => 'civicrm_dedupe_rule_group',
1217 'keyColumn' => 'id',
1218 'labelColumn' => 'title',
1219 'nameColumn' => 'name',
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',
1228 'type' => 'CheckBox',
1233 return self
::$_fields;
1236 * Returns an array containing, for each field, the arary key used for that
1237 * field in self::$_fields.
1241 static function &fieldKeys() {
1242 if (!(self
::$_fieldKeys)) {
1243 self
::$_fieldKeys = array(
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',
1312 return self
::$_fieldKeys;
1315 * Returns the names of this table
1319 static function getTableName() {
1320 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1323 * Returns if this table needs to be logged
1331 * Returns the list of fields that can be imported
1333 * @param bool $prefix
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)) {
1344 self
::$_import['event'] = & $fields[$name];
1346 self
::$_import[$name] = & $fields[$name];
1351 return self
::$_import;
1354 * Returns the list of fields that can be exported
1356 * @param bool $prefix
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)) {
1367 self
::$_export['event'] = & $fields[$name];
1369 self
::$_export[$name] = & $fields[$name];
1374 return self
::$_export;