5 * @copyright CiviCRM LLC (c) 2004-2018
7 * Generated from xml/schema/CRM/Event/Event.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:44df1cb5691958b88be856f793adabca)
13 * Database access object for the Event entity.
15 class CRM_Event_DAO_Event
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 static $_tableName = 'civicrm_event';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
39 * Event Title (e.g. Fall Fundraiser Dinner)
46 * 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.
53 * Full description of event. Text and html allowed. Displayed on built-in Event Information screens.
60 * Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.
64 public $event_type_id;
67 * Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.
71 public $participant_listing_id;
74 * Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.
81 * Date and time that event starts.
88 * Date and time that event ends. May be NULL if no defined end date/time
95 * If true, include registration link on Event Info page.
99 public $is_online_registration;
102 * Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.
106 public $registration_link_text;
109 * Date and time that online registration starts.
113 public $registration_start_date;
116 * Date and time that online registration ends.
120 public $registration_end_date;
123 * 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.
127 public $max_participants;
130 * 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.
134 public $event_full_text;
137 * If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.
144 * Financial type assigned to paid event registrations for this event. Required if is_monetary is true.
148 public $financial_type_id;
151 * Payment Processors configured for this Event (if is_monetary is true)
155 public $payment_processor;
158 * Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?
165 * Is this Event enabled or disabled/cancelled?
177 * If true, show event location.
181 public $is_show_location;
184 * FK to Location Block ID
188 public $loc_block_id;
191 * Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.
195 public $default_role_id;
198 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
205 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
212 * Title for Confirmation page.
216 public $confirm_title;
219 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
223 public $confirm_text;
226 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
230 public $confirm_footer_text;
233 * If true, confirmation is automatically emailed to contact on successful registration.
237 public $is_email_confirm;
240 * text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now
244 public $confirm_email_text;
247 * FROM email name used for confirmation emails.
251 public $confirm_from_name;
254 * FROM email address used for confirmation emails.
258 public $confirm_from_email;
261 * comma-separated list of email addresses to cc each time a confirmation is sent
268 * comma-separated list of email addresses to bcc each time a confirmation is sent
275 * FK to civicrm_option_value.
279 public $default_fee_id;
282 * FK to civicrm_option_value.
286 public $default_discount_fee_id;
289 * Title for ThankYou page.
293 public $thankyou_title;
300 public $thankyou_text;
307 public $thankyou_footer_text;
310 * if true - allows the user to send payment directly to the org later
314 public $is_pay_later;
317 * The text displayed to the user in the main form
321 public $pay_later_text;
324 * The receipt sent to the user instead of the normal receipt text
328 public $pay_later_receipt;
331 * is partial payment enabled for this event
335 public $is_partial_payment;
338 * Initial amount label for partial payment
342 public $initial_amount_label;
345 * Initial amount help text for partial payment
349 public $initial_amount_help_text;
352 * Minimum initial amount for partial payment
356 public $min_initial_amount;
359 * if true - allows the user to register multiple participants for event
363 public $is_multiple_registrations;
366 * Maximum number of additional participants that can be registered on a single booking
370 public $max_additional_participants;
373 * if true - allows the user to register multiple registrations from same email address.
377 public $allow_same_participant_emails;
380 * Whether the event has waitlist support.
384 public $has_waitlist;
387 * Whether participants require approval before they can finish registering.
391 public $requires_approval;
394 * Expire pending but unconfirmed registrations after this many hours.
398 public $expiration_time;
401 * Allow self service cancellation or transfer for event?
405 public $allow_selfcancelxfer;
408 * Number of hours prior to event start date to allow self-service cancellation or transfer.
412 public $selfcancelxfer_time;
415 * Text to display when the event is full, but participants can signup for a waitlist.
419 public $waitlist_text;
422 * Text to display when the approval is required to complete registration for an event.
426 public $approval_req_text;
429 * whether the event has template
436 * Event Template Title
440 public $template_title;
443 * FK to civicrm_contact, who created this event
450 * Date and time that event was created.
454 public $created_date;
457 * 3 character string, value from config setting or input via user.
464 * The campaign for which this event has been created.
471 * Can people share the event through social media?
478 * If false, the event booking confirmation screen gets skipped
482 public $is_confirm_enabled;
485 * Implicit FK to civicrm_event: parent event
489 public $parent_event_id;
492 * Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.
496 public $slot_label_id;
499 * Rule to use when matching registrations for this event
503 public $dedupe_rule_group_id;
506 * if true than billing block is required this event
510 public $is_billing_required;
515 public function __construct() {
516 $this->__table
= 'civicrm_event';
517 parent
::__construct();
521 * Returns foreign keys and entity references.
524 * [CRM_Core_Reference_Interface]
526 public static function getReferenceColumns() {
527 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
528 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
529 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'loc_block_id', 'civicrm_loc_block', 'id');
530 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'created_id', 'civicrm_contact', 'id');
531 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
532 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'dedupe_rule_group_id', 'civicrm_dedupe_rule_group', 'id');
533 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
535 return Civi
::$statics[__CLASS__
]['links'];
539 * Returns all the column names of this table
543 public static function &fields() {
544 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
545 Civi
::$statics[__CLASS__
]['fields'] = [
548 'type' => CRM_Utils_Type
::T_INT
,
549 'title' => ts('Event ID'),
550 'description' => ts('Event'),
552 'table_name' => 'civicrm_event',
554 'bao' => 'CRM_Event_BAO_Event',
559 'type' => CRM_Utils_Type
::T_STRING
,
560 'title' => ts('Event Title'),
561 'description' => ts('Event Title (e.g. Fall Fundraiser Dinner)'),
563 'size' => CRM_Utils_Type
::HUGE
,
565 'where' => 'civicrm_event.title',
566 'headerPattern' => '/(event.)?title$/i',
569 'table_name' => 'civicrm_event',
571 'bao' => 'CRM_Event_BAO_Event',
579 'type' => CRM_Utils_Type
::T_TEXT
,
580 'title' => ts('Event Summary'),
581 '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.'),
584 'table_name' => 'civicrm_event',
586 'bao' => 'CRM_Event_BAO_Event',
589 'type' => 'TextArea',
592 'event_description' => [
593 'name' => 'description',
594 'type' => CRM_Utils_Type
::T_TEXT
,
595 'title' => ts('Event Description'),
596 'description' => ts('Full description of event. Text and html allowed. Displayed on built-in Event Information screens.'),
599 'table_name' => 'civicrm_event',
601 'bao' => 'CRM_Event_BAO_Event',
604 'type' => 'TextArea',
608 'name' => 'event_type_id',
609 'type' => CRM_Utils_Type
::T_INT
,
610 'title' => ts('Event Type'),
611 'description' => ts('Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.'),
613 'table_name' => 'civicrm_event',
615 'bao' => 'CRM_Event_BAO_Event',
620 'pseudoconstant' => [
621 'optionGroupName' => 'event_type',
622 'optionEditPath' => 'civicrm/admin/options/event_type',
625 'participant_listing_id' => [
626 'name' => 'participant_listing_id',
627 'type' => CRM_Utils_Type
::T_INT
,
628 'title' => ts('Participant Listing'),
629 'description' => ts('Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.'),
631 'table_name' => 'civicrm_event',
633 'bao' => 'CRM_Event_BAO_Event',
638 'pseudoconstant' => [
639 'optionGroupName' => 'participant_listing',
640 'optionEditPath' => 'civicrm/admin/options/participant_listing',
644 'name' => 'is_public',
645 'type' => CRM_Utils_Type
::T_BOOLEAN
,
646 'title' => ts('Is Event Public'),
647 'description' => ts('Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.'),
649 'table_name' => 'civicrm_event',
651 'bao' => 'CRM_Event_BAO_Event',
654 'type' => 'CheckBox',
657 'event_start_date' => [
658 'name' => 'start_date',
659 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
660 'title' => ts('Event Start Date'),
661 'description' => ts('Date and time that event starts.'),
663 'where' => 'civicrm_event.start_date',
664 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
667 'table_name' => 'civicrm_event',
669 'bao' => 'CRM_Event_BAO_Event',
672 'type' => 'Select Date',
673 'formatType' => 'activityDateTime',
676 'event_end_date' => [
677 'name' => 'end_date',
678 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
679 'title' => ts('Event End Date'),
680 'description' => ts('Date and time that event ends. May be NULL if no defined end date/time'),
682 'where' => 'civicrm_event.end_date',
683 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
686 'table_name' => 'civicrm_event',
688 'bao' => 'CRM_Event_BAO_Event',
691 'type' => 'Select Date',
692 'formatType' => 'activityDateTime',
695 'is_online_registration' => [
696 'name' => 'is_online_registration',
697 'type' => CRM_Utils_Type
::T_BOOLEAN
,
698 'title' => ts('Is Online Registration'),
699 'description' => ts('If true, include registration link on Event Info page.'),
701 'table_name' => 'civicrm_event',
703 'bao' => 'CRM_Event_BAO_Event',
706 'type' => 'CheckBox',
709 'registration_link_text' => [
710 'name' => 'registration_link_text',
711 'type' => CRM_Utils_Type
::T_STRING
,
712 'title' => ts('Event Registration Link Text'),
713 'description' => ts('Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.'),
715 'size' => CRM_Utils_Type
::HUGE
,
716 'table_name' => 'civicrm_event',
718 'bao' => 'CRM_Event_BAO_Event',
724 'registration_start_date' => [
725 'name' => 'registration_start_date',
726 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
727 'title' => ts('Registration Start Date'),
728 'description' => ts('Date and time that online registration starts.'),
729 'table_name' => 'civicrm_event',
731 'bao' => 'CRM_Event_BAO_Event',
734 'type' => 'Select Date',
735 'formatType' => 'activityDateTime',
738 'registration_end_date' => [
739 'name' => 'registration_end_date',
740 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
741 'title' => ts('Registration End Date'),
742 'description' => ts('Date and time that online registration ends.'),
743 'table_name' => 'civicrm_event',
745 'bao' => 'CRM_Event_BAO_Event',
748 'type' => 'Select Date',
749 'formatType' => 'activityDateTime',
752 'max_participants' => [
753 'name' => 'max_participants',
754 'type' => CRM_Utils_Type
::T_INT
,
755 'title' => ts('Max Participants'),
756 '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.'),
758 'table_name' => 'civicrm_event',
760 'bao' => 'CRM_Event_BAO_Event',
766 'event_full_text' => [
767 'name' => 'event_full_text',
768 'type' => CRM_Utils_Type
::T_TEXT
,
769 'title' => ts('Event Information'),
770 '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.'),
773 'table_name' => 'civicrm_event',
775 'bao' => 'CRM_Event_BAO_Event',
778 'type' => 'TextArea',
782 'name' => 'is_monetary',
783 'type' => CRM_Utils_Type
::T_BOOLEAN
,
784 'title' => ts('Is this a PAID event?'),
785 'description' => ts('If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.'),
787 'table_name' => 'civicrm_event',
789 'bao' => 'CRM_Event_BAO_Event',
792 'type' => 'CheckBox',
795 'financial_type_id' => [
796 'name' => 'financial_type_id',
797 'type' => CRM_Utils_Type
::T_INT
,
798 'title' => ts('Financial Type'),
799 'description' => ts('Financial type assigned to paid event registrations for this event. Required if is_monetary is true.'),
801 'table_name' => 'civicrm_event',
803 'bao' => 'CRM_Event_BAO_Event',
808 'pseudoconstant' => [
809 'table' => 'civicrm_financial_type',
811 'labelColumn' => 'name',
814 'payment_processor' => [
815 'name' => 'payment_processor',
816 'type' => CRM_Utils_Type
::T_STRING
,
817 'title' => ts('Payment Processor'),
818 'description' => ts('Payment Processors configured for this Event (if is_monetary is true)'),
820 'size' => CRM_Utils_Type
::HUGE
,
821 'table_name' => 'civicrm_event',
823 'bao' => 'CRM_Event_BAO_Event',
828 'pseudoconstant' => [
829 'table' => 'civicrm_payment_processor',
831 'labelColumn' => 'name',
836 'type' => CRM_Utils_Type
::T_BOOLEAN
,
837 'title' => ts('Map Enabled'),
838 'description' => ts('Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?'),
840 'table_name' => 'civicrm_event',
842 'bao' => 'CRM_Event_BAO_Event',
845 'type' => 'CheckBox',
849 'name' => 'is_active',
850 'type' => CRM_Utils_Type
::T_BOOLEAN
,
851 'title' => ts('Is Active'),
852 'description' => ts('Is this Event enabled or disabled/cancelled?'),
854 'table_name' => 'civicrm_event',
856 'bao' => 'CRM_Event_BAO_Event',
859 'type' => 'CheckBox',
863 'name' => 'fee_label',
864 'type' => CRM_Utils_Type
::T_STRING
,
865 'title' => ts('Fee Label'),
867 'size' => CRM_Utils_Type
::HUGE
,
869 'where' => 'civicrm_event.fee_label',
870 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
873 'table_name' => 'civicrm_event',
875 'bao' => 'CRM_Event_BAO_Event',
881 'is_show_location' => [
882 'name' => 'is_show_location',
883 'type' => CRM_Utils_Type
::T_BOOLEAN
,
884 'title' => ts('show location'),
885 'description' => ts('If true, show event location.'),
887 'table_name' => 'civicrm_event',
889 'bao' => 'CRM_Event_BAO_Event',
892 'type' => 'CheckBox',
896 'name' => 'loc_block_id',
897 'type' => CRM_Utils_Type
::T_INT
,
898 'title' => ts('Location Block ID'),
899 'description' => ts('FK to Location Block ID'),
900 'table_name' => 'civicrm_event',
902 'bao' => 'CRM_Event_BAO_Event',
904 'FKClassName' => 'CRM_Core_DAO_LocBlock',
906 'default_role_id' => [
907 'name' => 'default_role_id',
908 'type' => CRM_Utils_Type
::T_INT
,
909 'title' => ts('Default Role'),
910 'description' => ts('Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.'),
912 'where' => 'civicrm_event.default_role_id',
913 'headerPattern' => '',
917 'table_name' => 'civicrm_event',
919 'bao' => 'CRM_Event_BAO_Event',
924 'pseudoconstant' => [
925 'optionGroupName' => 'participant_role',
926 'optionEditPath' => 'civicrm/admin/options/participant_role',
930 'name' => 'intro_text',
931 'type' => CRM_Utils_Type
::T_TEXT
,
932 'title' => ts('Introductory Message'),
933 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
936 'table_name' => 'civicrm_event',
938 'bao' => 'CRM_Event_BAO_Event',
941 'type' => 'TextArea',
945 'name' => 'footer_text',
946 'type' => CRM_Utils_Type
::T_TEXT
,
947 'title' => ts('Footer Message'),
948 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
951 'table_name' => 'civicrm_event',
953 'bao' => 'CRM_Event_BAO_Event',
956 'type' => 'TextArea',
960 'name' => 'confirm_title',
961 'type' => CRM_Utils_Type
::T_STRING
,
962 'title' => ts('Confirmation Title'),
963 'description' => ts('Title for Confirmation page.'),
965 'size' => CRM_Utils_Type
::HUGE
,
967 'table_name' => 'civicrm_event',
969 'bao' => 'CRM_Event_BAO_Event',
976 'name' => 'confirm_text',
977 'type' => CRM_Utils_Type
::T_TEXT
,
978 'title' => ts('Confirm Text'),
979 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
982 'table_name' => 'civicrm_event',
984 'bao' => 'CRM_Event_BAO_Event',
987 'type' => 'TextArea',
990 'confirm_footer_text' => [
991 'name' => 'confirm_footer_text',
992 'type' => CRM_Utils_Type
::T_TEXT
,
993 'title' => ts('Footer Text'),
994 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
997 'table_name' => 'civicrm_event',
999 'bao' => 'CRM_Event_BAO_Event',
1002 'type' => 'TextArea',
1005 'is_email_confirm' => [
1006 'name' => 'is_email_confirm',
1007 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1008 'title' => ts('Is confirm email'),
1009 'description' => ts('If true, confirmation is automatically emailed to contact on successful registration.'),
1011 'table_name' => 'civicrm_event',
1012 'entity' => 'Event',
1013 'bao' => 'CRM_Event_BAO_Event',
1016 'type' => 'CheckBox',
1019 'confirm_email_text' => [
1020 'name' => 'confirm_email_text',
1021 'type' => CRM_Utils_Type
::T_TEXT
,
1022 'title' => ts('Confirmation Email Text'),
1023 'description' => ts('text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now'),
1026 'table_name' => 'civicrm_event',
1027 'entity' => 'Event',
1028 'bao' => 'CRM_Event_BAO_Event',
1031 'type' => 'TextArea',
1034 'confirm_from_name' => [
1035 'name' => 'confirm_from_name',
1036 'type' => CRM_Utils_Type
::T_STRING
,
1037 'title' => ts('Confirm From Name'),
1038 'description' => ts('FROM email name used for confirmation emails.'),
1040 'size' => CRM_Utils_Type
::HUGE
,
1041 'table_name' => 'civicrm_event',
1042 'entity' => 'Event',
1043 'bao' => 'CRM_Event_BAO_Event',
1049 'confirm_from_email' => [
1050 'name' => 'confirm_from_email',
1051 'type' => CRM_Utils_Type
::T_STRING
,
1052 'title' => ts('Confirm From Email'),
1053 'description' => ts('FROM email address used for confirmation emails.'),
1055 'size' => CRM_Utils_Type
::HUGE
,
1056 'table_name' => 'civicrm_event',
1057 'entity' => 'Event',
1058 'bao' => 'CRM_Event_BAO_Event',
1065 'name' => 'cc_confirm',
1066 'type' => CRM_Utils_Type
::T_STRING
,
1067 'title' => ts('Cc Confirm'),
1068 'description' => ts('comma-separated list of email addresses to cc each time a confirmation is sent'),
1070 'size' => CRM_Utils_Type
::HUGE
,
1071 'table_name' => 'civicrm_event',
1072 'entity' => 'Event',
1073 'bao' => 'CRM_Event_BAO_Event',
1080 'name' => 'bcc_confirm',
1081 'type' => CRM_Utils_Type
::T_STRING
,
1082 'title' => ts('Bcc Confirm'),
1083 'description' => ts('comma-separated list of email addresses to bcc each time a confirmation is sent'),
1085 'size' => CRM_Utils_Type
::HUGE
,
1086 'table_name' => 'civicrm_event',
1087 'entity' => 'Event',
1088 'bao' => 'CRM_Event_BAO_Event',
1094 'default_fee_id' => [
1095 'name' => 'default_fee_id',
1096 'type' => CRM_Utils_Type
::T_INT
,
1097 'title' => ts('Default Fee ID'),
1098 'description' => ts('FK to civicrm_option_value.'),
1099 'table_name' => 'civicrm_event',
1100 'entity' => 'Event',
1101 'bao' => 'CRM_Event_BAO_Event',
1104 'default_discount_fee_id' => [
1105 'name' => 'default_discount_fee_id',
1106 'type' => CRM_Utils_Type
::T_INT
,
1107 'title' => ts('Default Discount Fee ID'),
1108 'description' => ts('FK to civicrm_option_value.'),
1109 'table_name' => 'civicrm_event',
1110 'entity' => 'Event',
1111 'bao' => 'CRM_Event_BAO_Event',
1114 'thankyou_title' => [
1115 'name' => 'thankyou_title',
1116 'type' => CRM_Utils_Type
::T_STRING
,
1117 'title' => ts('ThankYou Title'),
1118 'description' => ts('Title for ThankYou page.'),
1120 'size' => CRM_Utils_Type
::HUGE
,
1121 'default' => 'NULL',
1122 'table_name' => 'civicrm_event',
1123 'entity' => 'Event',
1124 'bao' => 'CRM_Event_BAO_Event',
1130 'thankyou_text' => [
1131 'name' => 'thankyou_text',
1132 'type' => CRM_Utils_Type
::T_TEXT
,
1133 'title' => ts('ThankYou Text'),
1134 'description' => ts('ThankYou Text.'),
1137 'table_name' => 'civicrm_event',
1138 'entity' => 'Event',
1139 'bao' => 'CRM_Event_BAO_Event',
1142 'type' => 'TextArea',
1145 'thankyou_footer_text' => [
1146 'name' => 'thankyou_footer_text',
1147 'type' => CRM_Utils_Type
::T_TEXT
,
1148 'title' => ts('Footer Text'),
1149 'description' => ts('Footer message.'),
1152 'table_name' => 'civicrm_event',
1153 'entity' => 'Event',
1154 'bao' => 'CRM_Event_BAO_Event',
1157 'type' => 'TextArea',
1161 'name' => 'is_pay_later',
1162 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1163 'title' => ts('Pay Later Allowed'),
1164 'description' => ts('if true - allows the user to send payment directly to the org later'),
1166 'table_name' => 'civicrm_event',
1167 'entity' => 'Event',
1168 'bao' => 'CRM_Event_BAO_Event',
1171 'type' => 'CheckBox',
1174 'pay_later_text' => [
1175 'name' => 'pay_later_text',
1176 'type' => CRM_Utils_Type
::T_TEXT
,
1177 'title' => ts('Pay Later Text'),
1178 'description' => ts('The text displayed to the user in the main form'),
1179 'table_name' => 'civicrm_event',
1180 'entity' => 'Event',
1181 'bao' => 'CRM_Event_BAO_Event',
1187 'pay_later_receipt' => [
1188 'name' => 'pay_later_receipt',
1189 'type' => CRM_Utils_Type
::T_TEXT
,
1190 'title' => ts('Pay Later Receipt Text'),
1191 'description' => ts('The receipt sent to the user instead of the normal receipt text'),
1192 'table_name' => 'civicrm_event',
1193 'entity' => 'Event',
1194 'bao' => 'CRM_Event_BAO_Event',
1200 'is_partial_payment' => [
1201 'name' => 'is_partial_payment',
1202 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1203 'title' => ts('Partial Payments Enabled'),
1204 'description' => ts('is partial payment enabled for this event'),
1206 'table_name' => 'civicrm_event',
1207 'entity' => 'Event',
1208 'bao' => 'CRM_Event_BAO_Event',
1211 'type' => 'CheckBox',
1214 'initial_amount_label' => [
1215 'name' => 'initial_amount_label',
1216 'type' => CRM_Utils_Type
::T_STRING
,
1217 'title' => ts('Initial Amount Label'),
1218 'description' => ts('Initial amount label for partial payment'),
1220 'size' => CRM_Utils_Type
::HUGE
,
1221 'table_name' => 'civicrm_event',
1222 'entity' => 'Event',
1223 'bao' => 'CRM_Event_BAO_Event',
1229 'initial_amount_help_text' => [
1230 'name' => 'initial_amount_help_text',
1231 'type' => CRM_Utils_Type
::T_TEXT
,
1232 'title' => ts('Initial Amount Help Text'),
1233 'description' => ts('Initial amount help text for partial payment'),
1234 'table_name' => 'civicrm_event',
1235 'entity' => 'Event',
1236 'bao' => 'CRM_Event_BAO_Event',
1242 'min_initial_amount' => [
1243 'name' => 'min_initial_amount',
1244 'type' => CRM_Utils_Type
::T_MONEY
,
1245 'title' => ts('Minimum Initial Amount'),
1246 'description' => ts('Minimum initial amount for partial payment'),
1251 'table_name' => 'civicrm_event',
1252 'entity' => 'Event',
1253 'bao' => 'CRM_Event_BAO_Event',
1259 'is_multiple_registrations' => [
1260 'name' => 'is_multiple_registrations',
1261 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1262 'title' => ts('Allow Multiple Registrations'),
1263 'description' => ts('if true - allows the user to register multiple participants for event'),
1265 'table_name' => 'civicrm_event',
1266 'entity' => 'Event',
1267 'bao' => 'CRM_Event_BAO_Event',
1270 'type' => 'CheckBox',
1273 'max_additional_participants' => [
1274 'name' => 'max_additional_participants',
1275 'type' => CRM_Utils_Type
::T_INT
,
1276 'title' => ts('Maximum number of additional participants per registration'),
1277 'description' => ts('Maximum number of additional participants that can be registered on a single booking'),
1279 'table_name' => 'civicrm_event',
1280 'entity' => 'Event',
1281 'bao' => 'CRM_Event_BAO_Event',
1284 'allow_same_participant_emails' => [
1285 'name' => 'allow_same_participant_emails',
1286 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1287 'title' => ts('Does Event allow multiple registrations from same email address?'),
1288 'description' => ts('if true - allows the user to register multiple registrations from same email address.'),
1290 'table_name' => 'civicrm_event',
1291 'entity' => 'Event',
1292 'bao' => 'CRM_Event_BAO_Event',
1295 'type' => 'CheckBox',
1299 'name' => 'has_waitlist',
1300 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1301 'title' => ts('Waitlist Enabled'),
1302 'description' => ts('Whether the event has waitlist support.'),
1303 'table_name' => 'civicrm_event',
1304 'entity' => 'Event',
1305 'bao' => 'CRM_Event_BAO_Event',
1308 'type' => 'CheckBox',
1311 'requires_approval' => [
1312 'name' => 'requires_approval',
1313 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1314 'title' => ts('Requires Approval'),
1315 'description' => ts('Whether participants require approval before they can finish registering.'),
1316 'table_name' => 'civicrm_event',
1317 'entity' => 'Event',
1318 'bao' => 'CRM_Event_BAO_Event',
1321 'type' => 'CheckBox',
1324 'expiration_time' => [
1325 'name' => 'expiration_time',
1326 'type' => CRM_Utils_Type
::T_INT
,
1327 'title' => ts('Expiration Time'),
1328 'description' => ts('Expire pending but unconfirmed registrations after this many hours.'),
1329 'table_name' => 'civicrm_event',
1330 'entity' => 'Event',
1331 'bao' => 'CRM_Event_BAO_Event',
1337 'allow_selfcancelxfer' => [
1338 'name' => 'allow_selfcancelxfer',
1339 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1340 'title' => ts('Allow Self-service Cancellation or Transfer'),
1341 'description' => ts('Allow self service cancellation or transfer for event?'),
1343 'table_name' => 'civicrm_event',
1344 'entity' => 'Event',
1345 'bao' => 'CRM_Event_BAO_Event',
1348 'type' => 'CheckBox',
1351 'selfcancelxfer_time' => [
1352 'name' => 'selfcancelxfer_time',
1353 'type' => CRM_Utils_Type
::T_INT
,
1354 'title' => ts('Self-service Cancellation or Transfer Time'),
1355 'description' => ts('Number of hours prior to event start date to allow self-service cancellation or transfer.'),
1357 'table_name' => 'civicrm_event',
1358 'entity' => 'Event',
1359 'bao' => 'CRM_Event_BAO_Event',
1365 'waitlist_text' => [
1366 'name' => 'waitlist_text',
1367 'type' => CRM_Utils_Type
::T_TEXT
,
1368 'title' => ts('Waitlist Text'),
1369 'description' => ts('Text to display when the event is full, but participants can signup for a waitlist.'),
1372 'table_name' => 'civicrm_event',
1373 'entity' => 'Event',
1374 'bao' => 'CRM_Event_BAO_Event',
1377 'type' => 'TextArea',
1380 'approval_req_text' => [
1381 'name' => 'approval_req_text',
1382 'type' => CRM_Utils_Type
::T_TEXT
,
1383 'title' => ts('Approval Req Text'),
1384 'description' => ts('Text to display when the approval is required to complete registration for an event.'),
1387 'table_name' => 'civicrm_event',
1388 'entity' => 'Event',
1389 'bao' => 'CRM_Event_BAO_Event',
1392 'type' => 'TextArea',
1396 'name' => 'is_template',
1397 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1398 'title' => ts('Is an Event Template'),
1399 'description' => ts('whether the event has template'),
1402 'table_name' => 'civicrm_event',
1403 'entity' => 'Event',
1404 'bao' => 'CRM_Event_BAO_Event',
1407 'type' => 'CheckBox',
1410 'template_title' => [
1411 'name' => 'template_title',
1412 'type' => CRM_Utils_Type
::T_STRING
,
1413 'title' => ts('Event Template Title'),
1414 'description' => ts('Event Template Title'),
1416 'size' => CRM_Utils_Type
::HUGE
,
1418 'where' => 'civicrm_event.template_title',
1419 'headerPattern' => '/(template.)?title$/i',
1420 'dataPattern' => '',
1422 'table_name' => 'civicrm_event',
1423 'entity' => 'Event',
1424 'bao' => 'CRM_Event_BAO_Event',
1431 'name' => 'created_id',
1432 'type' => CRM_Utils_Type
::T_INT
,
1433 'title' => ts('Created By Contact ID'),
1434 'description' => ts('FK to civicrm_contact, who created this event'),
1435 'table_name' => 'civicrm_event',
1436 'entity' => 'Event',
1437 'bao' => 'CRM_Event_BAO_Event',
1439 'FKClassName' => 'CRM_Contact_DAO_Contact',
1442 'name' => 'created_date',
1443 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
1444 'title' => ts('Event Created Date'),
1445 'description' => ts('Date and time that event was created.'),
1446 'table_name' => 'civicrm_event',
1447 'entity' => 'Event',
1448 'bao' => 'CRM_Event_BAO_Event',
1452 'name' => 'currency',
1453 'type' => CRM_Utils_Type
::T_STRING
,
1454 'title' => ts('Currency'),
1455 'description' => ts('3 character string, value from config setting or input via user.'),
1457 'size' => CRM_Utils_Type
::FOUR
,
1459 'where' => 'civicrm_event.currency',
1460 'headerPattern' => '/cur(rency)?/i',
1461 'dataPattern' => '/^[A-Z]{3}$/i',
1463 'table_name' => 'civicrm_event',
1464 'entity' => 'Event',
1465 'bao' => 'CRM_Event_BAO_Event',
1470 'pseudoconstant' => [
1471 'table' => 'civicrm_currency',
1472 'keyColumn' => 'name',
1473 'labelColumn' => 'full_name',
1474 'nameColumn' => 'name',
1478 'name' => 'campaign_id',
1479 'type' => CRM_Utils_Type
::T_INT
,
1480 'title' => ts('Campaign'),
1481 'description' => ts('The campaign for which this event has been created.'),
1482 'table_name' => 'civicrm_event',
1483 'entity' => 'Event',
1484 'bao' => 'CRM_Event_BAO_Event',
1486 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1488 'type' => 'EntityRef',
1490 'pseudoconstant' => [
1491 'table' => 'civicrm_campaign',
1492 'keyColumn' => 'id',
1493 'labelColumn' => 'title',
1497 'name' => 'is_share',
1498 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1499 'title' => ts('Is shared through social media'),
1500 'description' => ts('Can people share the event through social media?'),
1502 'table_name' => 'civicrm_event',
1503 'entity' => 'Event',
1504 'bao' => 'CRM_Event_BAO_Event',
1507 'type' => 'CheckBox',
1510 'is_confirm_enabled' => [
1511 'name' => 'is_confirm_enabled',
1512 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1513 'title' => ts('Is the booking confirmation screen enabled?'),
1514 'description' => ts('If false, the event booking confirmation screen gets skipped'),
1516 'table_name' => 'civicrm_event',
1517 'entity' => 'Event',
1518 'bao' => 'CRM_Event_BAO_Event',
1521 'type' => 'CheckBox',
1524 'parent_event_id' => [
1525 'name' => 'parent_event_id',
1526 'type' => CRM_Utils_Type
::T_INT
,
1527 'title' => ts('Parent Event ID'),
1528 'description' => ts('Implicit FK to civicrm_event: parent event'),
1529 'default' => 'NULL',
1530 'table_name' => 'civicrm_event',
1531 'entity' => 'Event',
1532 'bao' => 'CRM_Event_BAO_Event',
1535 'type' => 'EntityRef',
1538 'slot_label_id' => [
1539 'name' => 'slot_label_id',
1540 'type' => CRM_Utils_Type
::T_INT
,
1541 'title' => ts('Subevent Slot Label ID'),
1542 'description' => ts('Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.'),
1543 'default' => 'NULL',
1544 'table_name' => 'civicrm_event',
1545 'entity' => 'Event',
1546 'bao' => 'CRM_Event_BAO_Event',
1552 'dedupe_rule_group_id' => [
1553 'name' => 'dedupe_rule_group_id',
1554 'type' => CRM_Utils_Type
::T_INT
,
1555 'title' => ts('Dedupe Rule'),
1556 'description' => ts('Rule to use when matching registrations for this event'),
1557 'default' => 'NULL',
1558 'table_name' => 'civicrm_event',
1559 'entity' => 'Event',
1560 'bao' => 'CRM_Event_BAO_Event',
1562 'FKClassName' => 'CRM_Dedupe_DAO_RuleGroup',
1566 'pseudoconstant' => [
1567 'table' => 'civicrm_dedupe_rule_group',
1568 'keyColumn' => 'id',
1569 'labelColumn' => 'title',
1570 'nameColumn' => 'name',
1573 'is_billing_required' => [
1574 'name' => 'is_billing_required',
1575 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1576 'title' => ts('Is billing block required'),
1577 'description' => ts('if true than billing block is required this event'),
1579 'table_name' => 'civicrm_event',
1580 'entity' => 'Event',
1581 'bao' => 'CRM_Event_BAO_Event',
1584 'type' => 'CheckBox',
1588 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1590 return Civi
::$statics[__CLASS__
]['fields'];
1594 * Return a mapping from field-name to the corresponding key (as used in fields()).
1597 * Array(string $name => string $uniqueName).
1599 public static function &fieldKeys() {
1600 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1601 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1603 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1607 * Returns the names of this table
1611 public static function getTableName() {
1612 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1616 * Returns if this table needs to be logged
1620 public function getLog() {
1625 * Returns the list of fields that can be imported
1627 * @param bool $prefix
1631 public static function &import($prefix = FALSE) {
1632 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'event', $prefix, []);
1637 * Returns the list of fields that can be exported
1639 * @param bool $prefix
1643 public static function &export($prefix = FALSE) {
1644 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'event', $prefix, []);
1649 * Returns the list of indices
1651 * @param bool $localize
1655 public static function indices($localize = TRUE) {
1657 'index_event_type_id' => [
1658 'name' => 'index_event_type_id',
1660 0 => 'event_type_id',
1662 'localizable' => FALSE,
1663 'sig' => 'civicrm_event::0::event_type_id',
1665 'index_participant_listing_id' => [
1666 'name' => 'index_participant_listing_id',
1668 0 => 'participant_listing_id',
1670 'localizable' => FALSE,
1671 'sig' => 'civicrm_event::0::participant_listing_id',
1673 'index_parent_event_id' => [
1674 'name' => 'index_parent_event_id',
1676 0 => 'parent_event_id',
1678 'localizable' => FALSE,
1679 'sig' => 'civicrm_event::0::parent_event_id',
1682 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;