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:6c0950f3a5f6305f8d7e0a05d4703018)
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' => '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' => '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' => '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' => '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' => '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' => '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' => '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' => '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',
675 'event_end_date' => [
676 'name' => 'end_date',
677 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
678 'title' => ts('Event End Date'),
679 'description' => 'Date and time that event ends. May be NULL if no defined end date/time',
681 'where' => 'civicrm_event.end_date',
682 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
685 'table_name' => 'civicrm_event',
687 'bao' => 'CRM_Event_BAO_Event',
690 'type' => 'Select Date',
693 'is_online_registration' => [
694 'name' => 'is_online_registration',
695 'type' => CRM_Utils_Type
::T_BOOLEAN
,
696 'title' => ts('Is Online Registration'),
697 'description' => 'If true, include registration link on Event Info page.',
699 'table_name' => 'civicrm_event',
701 'bao' => 'CRM_Event_BAO_Event',
704 'type' => 'CheckBox',
707 'registration_link_text' => [
708 'name' => 'registration_link_text',
709 'type' => CRM_Utils_Type
::T_STRING
,
710 'title' => ts('Event Registration Link Text'),
711 'description' => 'Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.',
713 'size' => CRM_Utils_Type
::HUGE
,
714 'table_name' => 'civicrm_event',
716 'bao' => 'CRM_Event_BAO_Event',
722 'registration_start_date' => [
723 'name' => 'registration_start_date',
724 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
725 'title' => ts('Registration Start Date'),
726 'description' => 'Date and time that online registration starts.',
727 'table_name' => 'civicrm_event',
729 'bao' => 'CRM_Event_BAO_Event',
732 'type' => 'Select Date',
735 'registration_end_date' => [
736 'name' => 'registration_end_date',
737 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
738 'title' => ts('Registration End Date'),
739 'description' => 'Date and time that online registration ends.',
740 'table_name' => 'civicrm_event',
742 'bao' => 'CRM_Event_BAO_Event',
745 'type' => 'Select Date',
748 'max_participants' => [
749 'name' => 'max_participants',
750 'type' => CRM_Utils_Type
::T_INT
,
751 'title' => ts('Max Participants'),
752 '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.',
754 'table_name' => 'civicrm_event',
756 'bao' => 'CRM_Event_BAO_Event',
762 'event_full_text' => [
763 'name' => 'event_full_text',
764 'type' => CRM_Utils_Type
::T_TEXT
,
765 'title' => ts('Event Information'),
766 '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.',
769 'table_name' => 'civicrm_event',
771 'bao' => 'CRM_Event_BAO_Event',
774 'type' => 'TextArea',
778 'name' => 'is_monetary',
779 'type' => CRM_Utils_Type
::T_BOOLEAN
,
780 'title' => ts('Is this a PAID event?'),
781 'description' => 'If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.',
783 'table_name' => 'civicrm_event',
785 'bao' => 'CRM_Event_BAO_Event',
788 'type' => 'CheckBox',
791 'financial_type_id' => [
792 'name' => 'financial_type_id',
793 'type' => CRM_Utils_Type
::T_INT
,
794 'title' => ts('Financial Type'),
795 'description' => 'Financial type assigned to paid event registrations for this event. Required if is_monetary is true.',
797 'table_name' => 'civicrm_event',
799 'bao' => 'CRM_Event_BAO_Event',
804 'pseudoconstant' => [
805 'table' => 'civicrm_financial_type',
807 'labelColumn' => 'name',
810 'payment_processor' => [
811 'name' => 'payment_processor',
812 'type' => CRM_Utils_Type
::T_STRING
,
813 'title' => ts('Payment Processor'),
814 'description' => 'Payment Processors configured for this Event (if is_monetary is true)',
816 'size' => CRM_Utils_Type
::HUGE
,
817 'table_name' => 'civicrm_event',
819 'bao' => 'CRM_Event_BAO_Event',
824 'pseudoconstant' => [
825 'table' => 'civicrm_payment_processor',
827 'labelColumn' => 'name',
832 'type' => CRM_Utils_Type
::T_BOOLEAN
,
833 'title' => ts('Map Enabled'),
834 'description' => 'Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?',
836 'table_name' => 'civicrm_event',
838 'bao' => 'CRM_Event_BAO_Event',
841 'type' => 'CheckBox',
845 'name' => 'is_active',
846 'type' => CRM_Utils_Type
::T_BOOLEAN
,
847 'title' => ts('Is Active'),
848 'description' => 'Is this Event enabled or disabled/cancelled?',
850 'table_name' => 'civicrm_event',
852 'bao' => 'CRM_Event_BAO_Event',
855 'type' => 'CheckBox',
859 'name' => 'fee_label',
860 'type' => CRM_Utils_Type
::T_STRING
,
861 'title' => ts('Fee Label'),
863 'size' => CRM_Utils_Type
::HUGE
,
865 'where' => 'civicrm_event.fee_label',
866 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
869 'table_name' => 'civicrm_event',
871 'bao' => 'CRM_Event_BAO_Event',
877 'is_show_location' => [
878 'name' => 'is_show_location',
879 'type' => CRM_Utils_Type
::T_BOOLEAN
,
880 'title' => ts('show location'),
881 'description' => 'If true, show event location.',
883 'table_name' => 'civicrm_event',
885 'bao' => 'CRM_Event_BAO_Event',
888 'type' => 'CheckBox',
892 'name' => 'loc_block_id',
893 'type' => CRM_Utils_Type
::T_INT
,
894 'title' => ts('Location Block ID'),
895 'description' => 'FK to Location Block ID',
896 'table_name' => 'civicrm_event',
898 'bao' => 'CRM_Event_BAO_Event',
900 'FKClassName' => 'CRM_Core_DAO_LocBlock',
902 'default_role_id' => [
903 'name' => 'default_role_id',
904 'type' => CRM_Utils_Type
::T_INT
,
905 'title' => ts('Default Role'),
906 'description' => 'Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.',
908 'where' => 'civicrm_event.default_role_id',
909 'headerPattern' => '',
913 'table_name' => 'civicrm_event',
915 'bao' => 'CRM_Event_BAO_Event',
920 'pseudoconstant' => [
921 'optionGroupName' => 'participant_role',
922 'optionEditPath' => 'civicrm/admin/options/participant_role',
926 'name' => 'intro_text',
927 'type' => CRM_Utils_Type
::T_TEXT
,
928 'title' => ts('Introductory Message'),
929 'description' => 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
932 'table_name' => 'civicrm_event',
934 'bao' => 'CRM_Event_BAO_Event',
937 'type' => 'TextArea',
941 'name' => 'footer_text',
942 'type' => CRM_Utils_Type
::T_TEXT
,
943 'title' => ts('Footer Message'),
944 'description' => 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
947 'table_name' => 'civicrm_event',
949 'bao' => 'CRM_Event_BAO_Event',
952 'type' => 'TextArea',
956 'name' => 'confirm_title',
957 'type' => CRM_Utils_Type
::T_STRING
,
958 'title' => ts('Confirmation Title'),
959 'description' => 'Title for Confirmation page.',
961 'size' => CRM_Utils_Type
::HUGE
,
963 'table_name' => 'civicrm_event',
965 'bao' => 'CRM_Event_BAO_Event',
972 'name' => 'confirm_text',
973 'type' => CRM_Utils_Type
::T_TEXT
,
974 'title' => ts('Confirm Text'),
975 'description' => 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
978 'table_name' => 'civicrm_event',
980 'bao' => 'CRM_Event_BAO_Event',
983 'type' => 'TextArea',
986 'confirm_footer_text' => [
987 'name' => 'confirm_footer_text',
988 'type' => CRM_Utils_Type
::T_TEXT
,
989 'title' => ts('Footer Text'),
990 'description' => 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
993 'table_name' => 'civicrm_event',
995 'bao' => 'CRM_Event_BAO_Event',
998 'type' => 'TextArea',
1001 'is_email_confirm' => [
1002 'name' => 'is_email_confirm',
1003 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1004 'title' => ts('Is confirm email'),
1005 'description' => 'If true, confirmation is automatically emailed to contact on successful registration.',
1007 'table_name' => 'civicrm_event',
1008 'entity' => 'Event',
1009 'bao' => 'CRM_Event_BAO_Event',
1012 'type' => 'CheckBox',
1015 'confirm_email_text' => [
1016 'name' => 'confirm_email_text',
1017 'type' => CRM_Utils_Type
::T_TEXT
,
1018 'title' => ts('Confirmation Email Text'),
1019 'description' => 'text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now',
1022 'table_name' => 'civicrm_event',
1023 'entity' => 'Event',
1024 'bao' => 'CRM_Event_BAO_Event',
1027 'type' => 'TextArea',
1030 'confirm_from_name' => [
1031 'name' => 'confirm_from_name',
1032 'type' => CRM_Utils_Type
::T_STRING
,
1033 'title' => ts('Confirm From Name'),
1034 'description' => 'FROM email name used for confirmation emails.',
1036 'size' => CRM_Utils_Type
::HUGE
,
1037 'table_name' => 'civicrm_event',
1038 'entity' => 'Event',
1039 'bao' => 'CRM_Event_BAO_Event',
1045 'confirm_from_email' => [
1046 'name' => 'confirm_from_email',
1047 'type' => CRM_Utils_Type
::T_STRING
,
1048 'title' => ts('Confirm From Email'),
1049 'description' => 'FROM email address used for confirmation emails.',
1051 'size' => CRM_Utils_Type
::HUGE
,
1052 'table_name' => 'civicrm_event',
1053 'entity' => 'Event',
1054 'bao' => 'CRM_Event_BAO_Event',
1061 'name' => 'cc_confirm',
1062 'type' => CRM_Utils_Type
::T_STRING
,
1063 'title' => ts('Cc Confirm'),
1064 'description' => 'comma-separated list of email addresses to cc each time a confirmation is sent',
1066 'size' => CRM_Utils_Type
::HUGE
,
1067 'table_name' => 'civicrm_event',
1068 'entity' => 'Event',
1069 'bao' => 'CRM_Event_BAO_Event',
1076 'name' => 'bcc_confirm',
1077 'type' => CRM_Utils_Type
::T_STRING
,
1078 'title' => ts('Bcc Confirm'),
1079 'description' => 'comma-separated list of email addresses to bcc each time a confirmation is sent',
1081 'size' => CRM_Utils_Type
::HUGE
,
1082 'table_name' => 'civicrm_event',
1083 'entity' => 'Event',
1084 'bao' => 'CRM_Event_BAO_Event',
1090 'default_fee_id' => [
1091 'name' => 'default_fee_id',
1092 'type' => CRM_Utils_Type
::T_INT
,
1093 'title' => ts('Default Fee ID'),
1094 'description' => 'FK to civicrm_option_value.',
1095 'table_name' => 'civicrm_event',
1096 'entity' => 'Event',
1097 'bao' => 'CRM_Event_BAO_Event',
1100 'default_discount_fee_id' => [
1101 'name' => 'default_discount_fee_id',
1102 'type' => CRM_Utils_Type
::T_INT
,
1103 'title' => ts('Default Discount Fee ID'),
1104 'description' => 'FK to civicrm_option_value.',
1105 'table_name' => 'civicrm_event',
1106 'entity' => 'Event',
1107 'bao' => 'CRM_Event_BAO_Event',
1110 'thankyou_title' => [
1111 'name' => 'thankyou_title',
1112 'type' => CRM_Utils_Type
::T_STRING
,
1113 'title' => ts('ThankYou Title'),
1114 'description' => 'Title for ThankYou page.',
1116 'size' => CRM_Utils_Type
::HUGE
,
1117 'default' => 'NULL',
1118 'table_name' => 'civicrm_event',
1119 'entity' => 'Event',
1120 'bao' => 'CRM_Event_BAO_Event',
1126 'thankyou_text' => [
1127 'name' => 'thankyou_text',
1128 'type' => CRM_Utils_Type
::T_TEXT
,
1129 'title' => ts('ThankYou Text'),
1130 'description' => 'ThankYou Text.',
1133 'table_name' => 'civicrm_event',
1134 'entity' => 'Event',
1135 'bao' => 'CRM_Event_BAO_Event',
1138 'type' => 'TextArea',
1141 'thankyou_footer_text' => [
1142 'name' => 'thankyou_footer_text',
1143 'type' => CRM_Utils_Type
::T_TEXT
,
1144 'title' => ts('Footer Text'),
1145 'description' => 'Footer message.',
1148 'table_name' => 'civicrm_event',
1149 'entity' => 'Event',
1150 'bao' => 'CRM_Event_BAO_Event',
1153 'type' => 'TextArea',
1157 'name' => 'is_pay_later',
1158 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1159 'title' => ts('Pay Later Allowed'),
1160 'description' => 'if true - allows the user to send payment directly to the org later',
1162 'table_name' => 'civicrm_event',
1163 'entity' => 'Event',
1164 'bao' => 'CRM_Event_BAO_Event',
1167 'type' => 'CheckBox',
1170 'pay_later_text' => [
1171 'name' => 'pay_later_text',
1172 'type' => CRM_Utils_Type
::T_TEXT
,
1173 'title' => ts('Pay Later Text'),
1174 'description' => 'The text displayed to the user in the main form',
1175 'table_name' => 'civicrm_event',
1176 'entity' => 'Event',
1177 'bao' => 'CRM_Event_BAO_Event',
1183 'pay_later_receipt' => [
1184 'name' => 'pay_later_receipt',
1185 'type' => CRM_Utils_Type
::T_TEXT
,
1186 'title' => ts('Pay Later Receipt Text'),
1187 'description' => 'The receipt sent to the user instead of the normal receipt text',
1188 'table_name' => 'civicrm_event',
1189 'entity' => 'Event',
1190 'bao' => 'CRM_Event_BAO_Event',
1196 'is_partial_payment' => [
1197 'name' => 'is_partial_payment',
1198 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1199 'title' => ts('Partial Payments Enabled'),
1200 'description' => 'is partial payment enabled for this event',
1202 'table_name' => 'civicrm_event',
1203 'entity' => 'Event',
1204 'bao' => 'CRM_Event_BAO_Event',
1207 'type' => 'CheckBox',
1210 'initial_amount_label' => [
1211 'name' => 'initial_amount_label',
1212 'type' => CRM_Utils_Type
::T_STRING
,
1213 'title' => ts('Initial Amount Label'),
1214 'description' => 'Initial amount label for partial payment',
1216 'size' => CRM_Utils_Type
::HUGE
,
1217 'table_name' => 'civicrm_event',
1218 'entity' => 'Event',
1219 'bao' => 'CRM_Event_BAO_Event',
1225 'initial_amount_help_text' => [
1226 'name' => 'initial_amount_help_text',
1227 'type' => CRM_Utils_Type
::T_TEXT
,
1228 'title' => ts('Initial Amount Help Text'),
1229 'description' => 'Initial amount help text for partial payment',
1230 'table_name' => 'civicrm_event',
1231 'entity' => 'Event',
1232 'bao' => 'CRM_Event_BAO_Event',
1238 'min_initial_amount' => [
1239 'name' => 'min_initial_amount',
1240 'type' => CRM_Utils_Type
::T_MONEY
,
1241 'title' => ts('Minimum Initial Amount'),
1242 'description' => 'Minimum initial amount for partial payment',
1247 'table_name' => 'civicrm_event',
1248 'entity' => 'Event',
1249 'bao' => 'CRM_Event_BAO_Event',
1255 'is_multiple_registrations' => [
1256 'name' => 'is_multiple_registrations',
1257 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1258 'title' => ts('Allow Multiple Registrations'),
1259 'description' => 'if true - allows the user to register multiple participants for event',
1261 'table_name' => 'civicrm_event',
1262 'entity' => 'Event',
1263 'bao' => 'CRM_Event_BAO_Event',
1266 'type' => 'CheckBox',
1269 'max_additional_participants' => [
1270 'name' => 'max_additional_participants',
1271 'type' => CRM_Utils_Type
::T_INT
,
1272 'title' => ts('Maximum number of additional participants per registration'),
1273 'description' => 'Maximum number of additional participants that can be registered on a single booking',
1275 'table_name' => 'civicrm_event',
1276 'entity' => 'Event',
1277 'bao' => 'CRM_Event_BAO_Event',
1280 'allow_same_participant_emails' => [
1281 'name' => 'allow_same_participant_emails',
1282 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1283 'title' => ts('Does Event allow multiple registrations from same email address?'),
1284 'description' => 'if true - allows the user to register multiple registrations from same email address.',
1286 'table_name' => 'civicrm_event',
1287 'entity' => 'Event',
1288 'bao' => 'CRM_Event_BAO_Event',
1291 'type' => 'CheckBox',
1295 'name' => 'has_waitlist',
1296 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1297 'title' => ts('Waitlist Enabled'),
1298 'description' => 'Whether the event has waitlist support.',
1299 'table_name' => 'civicrm_event',
1300 'entity' => 'Event',
1301 'bao' => 'CRM_Event_BAO_Event',
1304 'type' => 'CheckBox',
1307 'requires_approval' => [
1308 'name' => 'requires_approval',
1309 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1310 'title' => ts('Requires Approval'),
1311 'description' => 'Whether participants require approval before they can finish registering.',
1312 'table_name' => 'civicrm_event',
1313 'entity' => 'Event',
1314 'bao' => 'CRM_Event_BAO_Event',
1317 'type' => 'CheckBox',
1320 'expiration_time' => [
1321 'name' => 'expiration_time',
1322 'type' => CRM_Utils_Type
::T_INT
,
1323 'title' => ts('Expiration Time'),
1324 'description' => 'Expire pending but unconfirmed registrations after this many hours.',
1325 'table_name' => 'civicrm_event',
1326 'entity' => 'Event',
1327 'bao' => 'CRM_Event_BAO_Event',
1333 'allow_selfcancelxfer' => [
1334 'name' => 'allow_selfcancelxfer',
1335 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1336 'title' => ts('Allow Self-service Cancellation or Transfer'),
1337 'description' => 'Allow self service cancellation or transfer for event?',
1339 'table_name' => 'civicrm_event',
1340 'entity' => 'Event',
1341 'bao' => 'CRM_Event_BAO_Event',
1344 'type' => 'CheckBox',
1347 'selfcancelxfer_time' => [
1348 'name' => 'selfcancelxfer_time',
1349 'type' => CRM_Utils_Type
::T_INT
,
1350 'title' => ts('Self-service Cancellation or Transfer Time'),
1351 'description' => 'Number of hours prior to event start date to allow self-service cancellation or transfer.',
1353 'table_name' => 'civicrm_event',
1354 'entity' => 'Event',
1355 'bao' => 'CRM_Event_BAO_Event',
1361 'waitlist_text' => [
1362 'name' => 'waitlist_text',
1363 'type' => CRM_Utils_Type
::T_TEXT
,
1364 'title' => ts('Waitlist Text'),
1365 'description' => 'Text to display when the event is full, but participants can signup for a waitlist.',
1368 'table_name' => 'civicrm_event',
1369 'entity' => 'Event',
1370 'bao' => 'CRM_Event_BAO_Event',
1373 'type' => 'TextArea',
1376 'approval_req_text' => [
1377 'name' => 'approval_req_text',
1378 'type' => CRM_Utils_Type
::T_TEXT
,
1379 'title' => ts('Approval Req Text'),
1380 'description' => 'Text to display when the approval is required to complete registration for an event.',
1383 'table_name' => 'civicrm_event',
1384 'entity' => 'Event',
1385 'bao' => 'CRM_Event_BAO_Event',
1388 'type' => 'TextArea',
1392 'name' => 'is_template',
1393 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1394 'title' => ts('Is an Event Template'),
1395 'description' => 'whether the event has template',
1398 'table_name' => 'civicrm_event',
1399 'entity' => 'Event',
1400 'bao' => 'CRM_Event_BAO_Event',
1403 'type' => 'CheckBox',
1406 'template_title' => [
1407 'name' => 'template_title',
1408 'type' => CRM_Utils_Type
::T_STRING
,
1409 'title' => ts('Event Template Title'),
1410 'description' => 'Event Template Title',
1412 'size' => CRM_Utils_Type
::HUGE
,
1414 'where' => 'civicrm_event.template_title',
1415 'headerPattern' => '/(template.)?title$/i',
1416 'dataPattern' => '',
1418 'table_name' => 'civicrm_event',
1419 'entity' => 'Event',
1420 'bao' => 'CRM_Event_BAO_Event',
1427 'name' => 'created_id',
1428 'type' => CRM_Utils_Type
::T_INT
,
1429 'title' => ts('Created By Contact ID'),
1430 'description' => 'FK to civicrm_contact, who created this event',
1431 'table_name' => 'civicrm_event',
1432 'entity' => 'Event',
1433 'bao' => 'CRM_Event_BAO_Event',
1435 'FKClassName' => 'CRM_Contact_DAO_Contact',
1438 'name' => 'created_date',
1439 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
1440 'title' => ts('Event Created Date'),
1441 'description' => 'Date and time that event was created.',
1442 'table_name' => 'civicrm_event',
1443 'entity' => 'Event',
1444 'bao' => 'CRM_Event_BAO_Event',
1448 'name' => 'currency',
1449 'type' => CRM_Utils_Type
::T_STRING
,
1450 'title' => ts('Currency'),
1451 'description' => '3 character string, value from config setting or input via user.',
1453 'size' => CRM_Utils_Type
::FOUR
,
1455 'where' => 'civicrm_event.currency',
1456 'headerPattern' => '/cur(rency)?/i',
1457 'dataPattern' => '/^[A-Z]{3}$/i',
1459 'table_name' => 'civicrm_event',
1460 'entity' => 'Event',
1461 'bao' => 'CRM_Event_BAO_Event',
1466 'pseudoconstant' => [
1467 'table' => 'civicrm_currency',
1468 'keyColumn' => 'name',
1469 'labelColumn' => 'full_name',
1470 'nameColumn' => 'name',
1474 'name' => 'campaign_id',
1475 'type' => CRM_Utils_Type
::T_INT
,
1476 'title' => ts('Campaign'),
1477 'description' => 'The campaign for which this event has been created.',
1478 'table_name' => 'civicrm_event',
1479 'entity' => 'Event',
1480 'bao' => 'CRM_Event_BAO_Event',
1482 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1484 'type' => 'EntityRef',
1486 'pseudoconstant' => [
1487 'table' => 'civicrm_campaign',
1488 'keyColumn' => 'id',
1489 'labelColumn' => 'title',
1493 'name' => 'is_share',
1494 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1495 'title' => ts('Is shared through social media'),
1496 'description' => 'Can people share the event through social media?',
1498 'table_name' => 'civicrm_event',
1499 'entity' => 'Event',
1500 'bao' => 'CRM_Event_BAO_Event',
1503 'type' => 'CheckBox',
1506 'is_confirm_enabled' => [
1507 'name' => 'is_confirm_enabled',
1508 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1509 'title' => ts('Is the booking confirmation screen enabled?'),
1510 'description' => 'If false, the event booking confirmation screen gets skipped',
1512 'table_name' => 'civicrm_event',
1513 'entity' => 'Event',
1514 'bao' => 'CRM_Event_BAO_Event',
1517 'type' => 'CheckBox',
1520 'parent_event_id' => [
1521 'name' => 'parent_event_id',
1522 'type' => CRM_Utils_Type
::T_INT
,
1523 'title' => ts('Parent Event ID'),
1524 'description' => 'Implicit FK to civicrm_event: parent event',
1525 'default' => 'NULL',
1526 'table_name' => 'civicrm_event',
1527 'entity' => 'Event',
1528 'bao' => 'CRM_Event_BAO_Event',
1531 'type' => 'EntityRef',
1534 'slot_label_id' => [
1535 'name' => 'slot_label_id',
1536 'type' => CRM_Utils_Type
::T_INT
,
1537 'title' => ts('Subevent Slot Label ID'),
1538 'description' => 'Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.',
1539 'default' => 'NULL',
1540 'table_name' => 'civicrm_event',
1541 'entity' => 'Event',
1542 'bao' => 'CRM_Event_BAO_Event',
1548 'dedupe_rule_group_id' => [
1549 'name' => 'dedupe_rule_group_id',
1550 'type' => CRM_Utils_Type
::T_INT
,
1551 'title' => ts('Dedupe Rule'),
1552 'description' => 'Rule to use when matching registrations for this event',
1553 'default' => 'NULL',
1554 'table_name' => 'civicrm_event',
1555 'entity' => 'Event',
1556 'bao' => 'CRM_Event_BAO_Event',
1558 'FKClassName' => 'CRM_Dedupe_DAO_RuleGroup',
1562 'pseudoconstant' => [
1563 'table' => 'civicrm_dedupe_rule_group',
1564 'keyColumn' => 'id',
1565 'labelColumn' => 'title',
1566 'nameColumn' => 'name',
1569 'is_billing_required' => [
1570 'name' => 'is_billing_required',
1571 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1572 'title' => ts('Is billing block required'),
1573 'description' => 'if true than billing block is required this event',
1575 'table_name' => 'civicrm_event',
1576 'entity' => 'Event',
1577 'bao' => 'CRM_Event_BAO_Event',
1580 'type' => 'CheckBox',
1584 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1586 return Civi
::$statics[__CLASS__
]['fields'];
1590 * Return a mapping from field-name to the corresponding key (as used in fields()).
1593 * Array(string $name => string $uniqueName).
1595 public static function &fieldKeys() {
1596 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1597 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1599 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1603 * Returns the names of this table
1607 public static function getTableName() {
1608 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1612 * Returns if this table needs to be logged
1616 public function getLog() {
1621 * Returns the list of fields that can be imported
1623 * @param bool $prefix
1627 public static function &import($prefix = FALSE) {
1628 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'event', $prefix, []);
1633 * Returns the list of fields that can be exported
1635 * @param bool $prefix
1639 public static function &export($prefix = FALSE) {
1640 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'event', $prefix, []);
1645 * Returns the list of indices
1647 * @param bool $localize
1651 public static function indices($localize = TRUE) {
1653 'index_event_type_id' => [
1654 'name' => 'index_event_type_id',
1656 0 => 'event_type_id',
1658 'localizable' => FALSE,
1659 'sig' => 'civicrm_event::0::event_type_id',
1661 'index_participant_listing_id' => [
1662 'name' => 'index_participant_listing_id',
1664 0 => 'participant_listing_id',
1666 'localizable' => FALSE,
1667 'sig' => 'civicrm_event::0::participant_listing_id',
1669 'index_parent_event_id' => [
1670 'name' => 'index_parent_event_id',
1672 0 => 'parent_event_id',
1674 'localizable' => FALSE,
1675 'sig' => 'civicrm_event::0::parent_event_id',
1678 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;