5 * @copyright CiviCRM LLC (c) 2004-2017
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.',
612 'table_name' => 'civicrm_event',
614 'bao' => 'CRM_Event_BAO_Event',
619 'pseudoconstant' => [
620 'optionGroupName' => 'event_type',
621 'optionEditPath' => 'civicrm/admin/options/event_type',
624 'participant_listing_id' => [
625 'name' => 'participant_listing_id',
626 'type' => CRM_Utils_Type
::T_INT
,
627 'title' => ts('Participant Listing'),
628 'description' => 'Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.',
629 'table_name' => 'civicrm_event',
631 'bao' => 'CRM_Event_BAO_Event',
636 'pseudoconstant' => [
637 'optionGroupName' => 'participant_listing',
638 'optionEditPath' => 'civicrm/admin/options/participant_listing',
642 'name' => 'is_public',
643 'type' => CRM_Utils_Type
::T_BOOLEAN
,
644 'title' => ts('Is Event Public'),
645 'description' => 'Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.',
647 'table_name' => 'civicrm_event',
649 'bao' => 'CRM_Event_BAO_Event',
652 'type' => 'CheckBox',
655 'event_start_date' => [
656 'name' => 'start_date',
657 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
658 'title' => ts('Event Start Date'),
659 'description' => 'Date and time that event starts.',
661 'where' => 'civicrm_event.start_date',
662 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
665 'table_name' => 'civicrm_event',
667 'bao' => 'CRM_Event_BAO_Event',
670 'type' => 'Select Date',
673 'event_end_date' => [
674 'name' => 'end_date',
675 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
676 'title' => ts('Event End Date'),
677 'description' => 'Date and time that event ends. May be NULL if no defined end date/time',
679 'where' => 'civicrm_event.end_date',
680 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
683 'table_name' => 'civicrm_event',
685 'bao' => 'CRM_Event_BAO_Event',
688 'type' => 'Select Date',
691 'is_online_registration' => [
692 'name' => 'is_online_registration',
693 'type' => CRM_Utils_Type
::T_BOOLEAN
,
694 'title' => ts('Is Online Registration'),
695 'description' => 'If true, include registration link on Event Info page.',
696 'table_name' => 'civicrm_event',
698 'bao' => 'CRM_Event_BAO_Event',
701 'type' => 'CheckBox',
704 'registration_link_text' => [
705 'name' => 'registration_link_text',
706 'type' => CRM_Utils_Type
::T_STRING
,
707 'title' => ts('Event Registration Link Text'),
708 'description' => 'Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.',
710 'size' => CRM_Utils_Type
::HUGE
,
711 'table_name' => 'civicrm_event',
713 'bao' => 'CRM_Event_BAO_Event',
719 'registration_start_date' => [
720 'name' => 'registration_start_date',
721 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
722 'title' => ts('Registration Start Date'),
723 'description' => 'Date and time that online registration starts.',
724 'table_name' => 'civicrm_event',
726 'bao' => 'CRM_Event_BAO_Event',
729 'type' => 'Select Date',
732 'registration_end_date' => [
733 'name' => 'registration_end_date',
734 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
735 'title' => ts('Registration End Date'),
736 'description' => 'Date and time that online registration ends.',
737 'table_name' => 'civicrm_event',
739 'bao' => 'CRM_Event_BAO_Event',
742 'type' => 'Select Date',
745 'max_participants' => [
746 'name' => 'max_participants',
747 'type' => CRM_Utils_Type
::T_INT
,
748 'title' => ts('Max Participants'),
749 '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.',
751 'table_name' => 'civicrm_event',
753 'bao' => 'CRM_Event_BAO_Event',
759 'event_full_text' => [
760 'name' => 'event_full_text',
761 'type' => CRM_Utils_Type
::T_TEXT
,
762 'title' => ts('Event Information'),
763 '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.',
766 'table_name' => 'civicrm_event',
768 'bao' => 'CRM_Event_BAO_Event',
771 'type' => 'TextArea',
775 'name' => 'is_monetary',
776 'type' => CRM_Utils_Type
::T_BOOLEAN
,
777 'title' => ts('Is this a PAID event?'),
778 'description' => 'If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.',
779 'table_name' => 'civicrm_event',
781 'bao' => 'CRM_Event_BAO_Event',
784 'type' => 'CheckBox',
787 'financial_type_id' => [
788 'name' => 'financial_type_id',
789 'type' => CRM_Utils_Type
::T_INT
,
790 'title' => ts('Financial Type'),
791 'description' => 'Financial type assigned to paid event registrations for this event. Required if is_monetary is true.',
793 'table_name' => 'civicrm_event',
795 'bao' => 'CRM_Event_BAO_Event',
800 'pseudoconstant' => [
801 'table' => 'civicrm_financial_type',
803 'labelColumn' => 'name',
806 'payment_processor' => [
807 'name' => 'payment_processor',
808 'type' => CRM_Utils_Type
::T_STRING
,
809 'title' => ts('Payment Processor'),
810 'description' => 'Payment Processors configured for this Event (if is_monetary is true)',
812 'size' => CRM_Utils_Type
::HUGE
,
813 'table_name' => 'civicrm_event',
815 'bao' => 'CRM_Event_BAO_Event',
820 'pseudoconstant' => [
821 'table' => 'civicrm_payment_processor',
823 'labelColumn' => 'name',
828 'type' => CRM_Utils_Type
::T_BOOLEAN
,
829 'title' => ts('Map Enabled'),
830 'description' => 'Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?',
831 'table_name' => 'civicrm_event',
833 'bao' => 'CRM_Event_BAO_Event',
836 'type' => 'CheckBox',
840 'name' => 'is_active',
841 'type' => CRM_Utils_Type
::T_BOOLEAN
,
842 'title' => ts('Is Active'),
843 'description' => 'Is this Event enabled or disabled/cancelled?',
844 'table_name' => 'civicrm_event',
846 'bao' => 'CRM_Event_BAO_Event',
849 'type' => 'CheckBox',
853 'name' => 'fee_label',
854 'type' => CRM_Utils_Type
::T_STRING
,
855 'title' => ts('Fee Label'),
857 'size' => CRM_Utils_Type
::HUGE
,
859 'where' => 'civicrm_event.fee_label',
860 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
863 'table_name' => 'civicrm_event',
865 'bao' => 'CRM_Event_BAO_Event',
871 'is_show_location' => [
872 'name' => 'is_show_location',
873 'type' => CRM_Utils_Type
::T_BOOLEAN
,
874 'title' => ts('show location'),
875 'description' => 'If true, show event location.',
877 'table_name' => 'civicrm_event',
879 'bao' => 'CRM_Event_BAO_Event',
882 'type' => 'CheckBox',
886 'name' => 'loc_block_id',
887 'type' => CRM_Utils_Type
::T_INT
,
888 'title' => ts('Location Block ID'),
889 'description' => 'FK to Location Block ID',
890 'table_name' => 'civicrm_event',
892 'bao' => 'CRM_Event_BAO_Event',
894 'FKClassName' => 'CRM_Core_DAO_LocBlock',
896 'default_role_id' => [
897 'name' => 'default_role_id',
898 'type' => CRM_Utils_Type
::T_INT
,
899 'title' => ts('Default Role'),
900 'description' => 'Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.',
902 'where' => 'civicrm_event.default_role_id',
903 'headerPattern' => '',
907 'table_name' => 'civicrm_event',
909 'bao' => 'CRM_Event_BAO_Event',
914 'pseudoconstant' => [
915 'optionGroupName' => 'participant_role',
916 'optionEditPath' => 'civicrm/admin/options/participant_role',
920 'name' => 'intro_text',
921 'type' => CRM_Utils_Type
::T_TEXT
,
922 'title' => ts('Introductory Message'),
923 'description' => 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
926 'table_name' => 'civicrm_event',
928 'bao' => 'CRM_Event_BAO_Event',
931 'type' => 'TextArea',
935 'name' => 'footer_text',
936 'type' => CRM_Utils_Type
::T_TEXT
,
937 'title' => ts('Footer Message'),
938 'description' => 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
941 'table_name' => 'civicrm_event',
943 'bao' => 'CRM_Event_BAO_Event',
946 'type' => 'TextArea',
950 'name' => 'confirm_title',
951 'type' => CRM_Utils_Type
::T_STRING
,
952 'title' => ts('Confirmation Title'),
953 'description' => 'Title for Confirmation page.',
955 'size' => CRM_Utils_Type
::HUGE
,
957 'table_name' => 'civicrm_event',
959 'bao' => 'CRM_Event_BAO_Event',
966 'name' => 'confirm_text',
967 'type' => CRM_Utils_Type
::T_TEXT
,
968 'title' => ts('Confirm Text'),
969 'description' => 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
972 'table_name' => 'civicrm_event',
974 'bao' => 'CRM_Event_BAO_Event',
977 'type' => 'TextArea',
980 'confirm_footer_text' => [
981 'name' => 'confirm_footer_text',
982 'type' => CRM_Utils_Type
::T_TEXT
,
983 'title' => ts('Footer Text'),
984 'description' => 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
987 'table_name' => 'civicrm_event',
989 'bao' => 'CRM_Event_BAO_Event',
992 'type' => 'TextArea',
995 'is_email_confirm' => [
996 'name' => 'is_email_confirm',
997 'type' => CRM_Utils_Type
::T_BOOLEAN
,
998 'title' => ts('Is confirm email'),
999 'description' => 'If true, confirmation is automatically emailed to contact on successful registration.',
1000 'table_name' => 'civicrm_event',
1001 'entity' => 'Event',
1002 'bao' => 'CRM_Event_BAO_Event',
1005 'type' => 'CheckBox',
1008 'confirm_email_text' => [
1009 'name' => 'confirm_email_text',
1010 'type' => CRM_Utils_Type
::T_TEXT
,
1011 'title' => ts('Confirmation Email Text'),
1012 'description' => 'text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now',
1015 'table_name' => 'civicrm_event',
1016 'entity' => 'Event',
1017 'bao' => 'CRM_Event_BAO_Event',
1020 'type' => 'TextArea',
1023 'confirm_from_name' => [
1024 'name' => 'confirm_from_name',
1025 'type' => CRM_Utils_Type
::T_STRING
,
1026 'title' => ts('Confirm From Name'),
1027 'description' => 'FROM email name used for confirmation emails.',
1029 'size' => CRM_Utils_Type
::HUGE
,
1030 'table_name' => 'civicrm_event',
1031 'entity' => 'Event',
1032 'bao' => 'CRM_Event_BAO_Event',
1038 'confirm_from_email' => [
1039 'name' => 'confirm_from_email',
1040 'type' => CRM_Utils_Type
::T_STRING
,
1041 'title' => ts('Confirm From Email'),
1042 'description' => 'FROM email address used for confirmation emails.',
1044 'size' => CRM_Utils_Type
::HUGE
,
1045 'table_name' => 'civicrm_event',
1046 'entity' => 'Event',
1047 'bao' => 'CRM_Event_BAO_Event',
1054 'name' => 'cc_confirm',
1055 'type' => CRM_Utils_Type
::T_STRING
,
1056 'title' => ts('Cc Confirm'),
1057 'description' => 'comma-separated list of email addresses to cc each time a confirmation is sent',
1059 'size' => CRM_Utils_Type
::HUGE
,
1060 'table_name' => 'civicrm_event',
1061 'entity' => 'Event',
1062 'bao' => 'CRM_Event_BAO_Event',
1069 'name' => 'bcc_confirm',
1070 'type' => CRM_Utils_Type
::T_STRING
,
1071 'title' => ts('Bcc Confirm'),
1072 'description' => 'comma-separated list of email addresses to bcc each time a confirmation is sent',
1074 'size' => CRM_Utils_Type
::HUGE
,
1075 'table_name' => 'civicrm_event',
1076 'entity' => 'Event',
1077 'bao' => 'CRM_Event_BAO_Event',
1083 'default_fee_id' => [
1084 'name' => 'default_fee_id',
1085 'type' => CRM_Utils_Type
::T_INT
,
1086 'title' => ts('Default Fee ID'),
1087 'description' => 'FK to civicrm_option_value.',
1088 'table_name' => 'civicrm_event',
1089 'entity' => 'Event',
1090 'bao' => 'CRM_Event_BAO_Event',
1093 'default_discount_fee_id' => [
1094 'name' => 'default_discount_fee_id',
1095 'type' => CRM_Utils_Type
::T_INT
,
1096 'title' => ts('Default Discount Fee ID'),
1097 'description' => 'FK to civicrm_option_value.',
1098 'table_name' => 'civicrm_event',
1099 'entity' => 'Event',
1100 'bao' => 'CRM_Event_BAO_Event',
1103 'thankyou_title' => [
1104 'name' => 'thankyou_title',
1105 'type' => CRM_Utils_Type
::T_STRING
,
1106 'title' => ts('ThankYou Title'),
1107 'description' => 'Title for ThankYou page.',
1109 'size' => CRM_Utils_Type
::HUGE
,
1110 'default' => 'NULL',
1111 'table_name' => 'civicrm_event',
1112 'entity' => 'Event',
1113 'bao' => 'CRM_Event_BAO_Event',
1119 'thankyou_text' => [
1120 'name' => 'thankyou_text',
1121 'type' => CRM_Utils_Type
::T_TEXT
,
1122 'title' => ts('ThankYou Text'),
1123 'description' => 'ThankYou Text.',
1126 'table_name' => 'civicrm_event',
1127 'entity' => 'Event',
1128 'bao' => 'CRM_Event_BAO_Event',
1131 'type' => 'TextArea',
1134 'thankyou_footer_text' => [
1135 'name' => 'thankyou_footer_text',
1136 'type' => CRM_Utils_Type
::T_TEXT
,
1137 'title' => ts('Footer Text'),
1138 'description' => 'Footer message.',
1141 'table_name' => 'civicrm_event',
1142 'entity' => 'Event',
1143 'bao' => 'CRM_Event_BAO_Event',
1146 'type' => 'TextArea',
1150 'name' => 'is_pay_later',
1151 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1152 'title' => ts('Pay Later Allowed'),
1153 'description' => 'if true - allows the user to send payment directly to the org later',
1154 'table_name' => 'civicrm_event',
1155 'entity' => 'Event',
1156 'bao' => 'CRM_Event_BAO_Event',
1159 'type' => 'CheckBox',
1162 'pay_later_text' => [
1163 'name' => 'pay_later_text',
1164 'type' => CRM_Utils_Type
::T_TEXT
,
1165 'title' => ts('Pay Later Text'),
1166 'description' => 'The text displayed to the user in the main form',
1167 'table_name' => 'civicrm_event',
1168 'entity' => 'Event',
1169 'bao' => 'CRM_Event_BAO_Event',
1175 'pay_later_receipt' => [
1176 'name' => 'pay_later_receipt',
1177 'type' => CRM_Utils_Type
::T_TEXT
,
1178 'title' => ts('Pay Later Receipt Text'),
1179 'description' => 'The receipt sent to the user instead of the normal receipt text',
1180 'table_name' => 'civicrm_event',
1181 'entity' => 'Event',
1182 'bao' => 'CRM_Event_BAO_Event',
1188 'is_partial_payment' => [
1189 'name' => 'is_partial_payment',
1190 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1191 'title' => ts('Partial Payments Enabled'),
1192 'description' => 'is partial payment enabled for this event',
1193 'table_name' => 'civicrm_event',
1194 'entity' => 'Event',
1195 'bao' => 'CRM_Event_BAO_Event',
1198 'type' => 'CheckBox',
1201 'initial_amount_label' => [
1202 'name' => 'initial_amount_label',
1203 'type' => CRM_Utils_Type
::T_STRING
,
1204 'title' => ts('Initial Amount Label'),
1205 'description' => 'Initial amount label for partial payment',
1207 'size' => CRM_Utils_Type
::HUGE
,
1208 'table_name' => 'civicrm_event',
1209 'entity' => 'Event',
1210 'bao' => 'CRM_Event_BAO_Event',
1216 'initial_amount_help_text' => [
1217 'name' => 'initial_amount_help_text',
1218 'type' => CRM_Utils_Type
::T_TEXT
,
1219 'title' => ts('Initial Amount Help Text'),
1220 'description' => 'Initial amount help text for partial payment',
1221 'table_name' => 'civicrm_event',
1222 'entity' => 'Event',
1223 'bao' => 'CRM_Event_BAO_Event',
1229 'min_initial_amount' => [
1230 'name' => 'min_initial_amount',
1231 'type' => CRM_Utils_Type
::T_MONEY
,
1232 'title' => ts('Minimum Initial Amount'),
1233 'description' => 'Minimum initial amount for partial payment',
1238 'table_name' => 'civicrm_event',
1239 'entity' => 'Event',
1240 'bao' => 'CRM_Event_BAO_Event',
1246 'is_multiple_registrations' => [
1247 'name' => 'is_multiple_registrations',
1248 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1249 'title' => ts('Allow Multiple Registrations'),
1250 'description' => 'if true - allows the user to register multiple participants for event',
1251 'table_name' => 'civicrm_event',
1252 'entity' => 'Event',
1253 'bao' => 'CRM_Event_BAO_Event',
1256 'type' => 'CheckBox',
1259 'max_additional_participants' => [
1260 'name' => 'max_additional_participants',
1261 'type' => CRM_Utils_Type
::T_INT
,
1262 'title' => ts('Maximum number of additional participants per registration'),
1263 'description' => 'Maximum number of additional participants that can be registered on a single booking',
1264 'table_name' => 'civicrm_event',
1265 'entity' => 'Event',
1266 'bao' => 'CRM_Event_BAO_Event',
1269 'allow_same_participant_emails' => [
1270 'name' => 'allow_same_participant_emails',
1271 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1272 'title' => ts('Does Event allow multiple registrations from same email address?'),
1273 'description' => 'if true - allows the user to register multiple registrations from same email address.',
1274 'table_name' => 'civicrm_event',
1275 'entity' => 'Event',
1276 'bao' => 'CRM_Event_BAO_Event',
1279 'type' => 'CheckBox',
1283 'name' => 'has_waitlist',
1284 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1285 'title' => ts('Waitlist Enabled'),
1286 'description' => 'Whether the event has waitlist support.',
1287 'table_name' => 'civicrm_event',
1288 'entity' => 'Event',
1289 'bao' => 'CRM_Event_BAO_Event',
1292 'type' => 'CheckBox',
1295 'requires_approval' => [
1296 'name' => 'requires_approval',
1297 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1298 'title' => ts('Requires Approval'),
1299 'description' => 'Whether participants require approval before they can finish registering.',
1300 'table_name' => 'civicrm_event',
1301 'entity' => 'Event',
1302 'bao' => 'CRM_Event_BAO_Event',
1305 'type' => 'CheckBox',
1308 'expiration_time' => [
1309 'name' => 'expiration_time',
1310 'type' => CRM_Utils_Type
::T_INT
,
1311 'title' => ts('Expiration Time'),
1312 'description' => 'Expire pending but unconfirmed registrations after this many hours.',
1313 'table_name' => 'civicrm_event',
1314 'entity' => 'Event',
1315 'bao' => 'CRM_Event_BAO_Event',
1321 'allow_selfcancelxfer' => [
1322 'name' => 'allow_selfcancelxfer',
1323 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1324 'title' => ts('Allow Self-service Cancellation or Transfer'),
1325 'description' => 'Allow self service cancellation or transfer for event?',
1326 'table_name' => 'civicrm_event',
1327 'entity' => 'Event',
1328 'bao' => 'CRM_Event_BAO_Event',
1331 'type' => 'CheckBox',
1334 'selfcancelxfer_time' => [
1335 'name' => 'selfcancelxfer_time',
1336 'type' => CRM_Utils_Type
::T_INT
,
1337 'title' => ts('Self-service Cancellation or Transfer Time'),
1338 'description' => 'Number of hours prior to event start date to allow self-service cancellation or transfer.',
1339 'table_name' => 'civicrm_event',
1340 'entity' => 'Event',
1341 'bao' => 'CRM_Event_BAO_Event',
1347 'waitlist_text' => [
1348 'name' => 'waitlist_text',
1349 'type' => CRM_Utils_Type
::T_TEXT
,
1350 'title' => ts('Waitlist Text'),
1351 'description' => 'Text to display when the event is full, but participants can signup for a waitlist.',
1354 'table_name' => 'civicrm_event',
1355 'entity' => 'Event',
1356 'bao' => 'CRM_Event_BAO_Event',
1359 'type' => 'TextArea',
1362 'approval_req_text' => [
1363 'name' => 'approval_req_text',
1364 'type' => CRM_Utils_Type
::T_TEXT
,
1365 'title' => ts('Approval Req Text'),
1366 'description' => 'Text to display when the approval is required to complete registration for an event.',
1369 'table_name' => 'civicrm_event',
1370 'entity' => 'Event',
1371 'bao' => 'CRM_Event_BAO_Event',
1374 'type' => 'TextArea',
1378 'name' => 'is_template',
1379 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1380 'title' => ts('Is an Event Template'),
1381 'description' => 'whether the event has template',
1383 'table_name' => 'civicrm_event',
1384 'entity' => 'Event',
1385 'bao' => 'CRM_Event_BAO_Event',
1388 'type' => 'CheckBox',
1391 'template_title' => [
1392 'name' => 'template_title',
1393 'type' => CRM_Utils_Type
::T_STRING
,
1394 'title' => ts('Event Template Title'),
1395 'description' => 'Event Template Title',
1397 'size' => CRM_Utils_Type
::HUGE
,
1399 'where' => 'civicrm_event.template_title',
1400 'headerPattern' => '/(template.)?title$/i',
1401 'dataPattern' => '',
1403 'table_name' => 'civicrm_event',
1404 'entity' => 'Event',
1405 'bao' => 'CRM_Event_BAO_Event',
1412 'name' => 'created_id',
1413 'type' => CRM_Utils_Type
::T_INT
,
1414 'title' => ts('Created By Contact ID'),
1415 'description' => 'FK to civicrm_contact, who created this event',
1416 'table_name' => 'civicrm_event',
1417 'entity' => 'Event',
1418 'bao' => 'CRM_Event_BAO_Event',
1420 'FKClassName' => 'CRM_Contact_DAO_Contact',
1423 'name' => 'created_date',
1424 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
1425 'title' => ts('Event Created Date'),
1426 'description' => 'Date and time that event was created.',
1427 'table_name' => 'civicrm_event',
1428 'entity' => 'Event',
1429 'bao' => 'CRM_Event_BAO_Event',
1433 'name' => 'currency',
1434 'type' => CRM_Utils_Type
::T_STRING
,
1435 'title' => ts('Currency'),
1436 'description' => '3 character string, value from config setting or input via user.',
1438 'size' => CRM_Utils_Type
::FOUR
,
1440 'where' => 'civicrm_event.currency',
1441 'headerPattern' => '/cur(rency)?/i',
1442 'dataPattern' => '/^[A-Z]{3}$/i',
1444 'table_name' => 'civicrm_event',
1445 'entity' => 'Event',
1446 'bao' => 'CRM_Event_BAO_Event',
1451 'pseudoconstant' => [
1452 'table' => 'civicrm_currency',
1453 'keyColumn' => 'name',
1454 'labelColumn' => 'full_name',
1455 'nameColumn' => 'name',
1459 'name' => 'campaign_id',
1460 'type' => CRM_Utils_Type
::T_INT
,
1461 'title' => ts('Campaign'),
1462 'description' => 'The campaign for which this event has been created.',
1463 'table_name' => 'civicrm_event',
1464 'entity' => 'Event',
1465 'bao' => 'CRM_Event_BAO_Event',
1467 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1469 'type' => 'EntityRef',
1471 'pseudoconstant' => [
1472 'table' => 'civicrm_campaign',
1473 'keyColumn' => 'id',
1474 'labelColumn' => 'title',
1478 'name' => 'is_share',
1479 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1480 'title' => ts('Is shared through social media'),
1481 'description' => 'Can people share the event through social media?',
1483 'table_name' => 'civicrm_event',
1484 'entity' => 'Event',
1485 'bao' => 'CRM_Event_BAO_Event',
1488 'type' => 'CheckBox',
1491 'is_confirm_enabled' => [
1492 'name' => 'is_confirm_enabled',
1493 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1494 'title' => ts('Is the booking confirmation screen enabled?'),
1495 'description' => 'If false, the event booking confirmation screen gets skipped',
1497 'table_name' => 'civicrm_event',
1498 'entity' => 'Event',
1499 'bao' => 'CRM_Event_BAO_Event',
1502 'type' => 'CheckBox',
1505 'parent_event_id' => [
1506 'name' => 'parent_event_id',
1507 'type' => CRM_Utils_Type
::T_INT
,
1508 'title' => ts('Parent Event ID'),
1509 'description' => 'Implicit FK to civicrm_event: parent event',
1510 'default' => 'NULL',
1511 'table_name' => 'civicrm_event',
1512 'entity' => 'Event',
1513 'bao' => 'CRM_Event_BAO_Event',
1516 'type' => 'EntityRef',
1519 'slot_label_id' => [
1520 'name' => 'slot_label_id',
1521 'type' => CRM_Utils_Type
::T_INT
,
1522 'title' => ts('Subevent Slot Label ID'),
1523 'description' => 'Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.',
1524 'default' => 'NULL',
1525 'table_name' => 'civicrm_event',
1526 'entity' => 'Event',
1527 'bao' => 'CRM_Event_BAO_Event',
1533 'dedupe_rule_group_id' => [
1534 'name' => 'dedupe_rule_group_id',
1535 'type' => CRM_Utils_Type
::T_INT
,
1536 'title' => ts('Dedupe Rule'),
1537 'description' => 'Rule to use when matching registrations for this event',
1538 'default' => 'NULL',
1539 'table_name' => 'civicrm_event',
1540 'entity' => 'Event',
1541 'bao' => 'CRM_Event_BAO_Event',
1543 'FKClassName' => 'CRM_Dedupe_DAO_RuleGroup',
1547 'pseudoconstant' => [
1548 'table' => 'civicrm_dedupe_rule_group',
1549 'keyColumn' => 'id',
1550 'labelColumn' => 'title',
1551 'nameColumn' => 'name',
1554 'is_billing_required' => [
1555 'name' => 'is_billing_required',
1556 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1557 'title' => ts('Is billing block required'),
1558 'description' => 'if true than billing block is required this event',
1559 'table_name' => 'civicrm_event',
1560 'entity' => 'Event',
1561 'bao' => 'CRM_Event_BAO_Event',
1564 'type' => 'CheckBox',
1568 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1570 return Civi
::$statics[__CLASS__
]['fields'];
1574 * Return a mapping from field-name to the corresponding key (as used in fields()).
1577 * Array(string $name => string $uniqueName).
1579 public static function &fieldKeys() {
1580 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1581 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1583 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1587 * Returns the names of this table
1591 public static function getTableName() {
1592 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1596 * Returns if this table needs to be logged
1600 public function getLog() {
1605 * Returns the list of fields that can be imported
1607 * @param bool $prefix
1611 public static function &import($prefix = FALSE) {
1612 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'event', $prefix, []);
1617 * Returns the list of fields that can be exported
1619 * @param bool $prefix
1623 public static function &export($prefix = FALSE) {
1624 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'event', $prefix, []);
1629 * Returns the list of indices
1631 * @param bool $localize
1635 public static function indices($localize = TRUE) {
1637 'index_event_type_id' => [
1638 'name' => 'index_event_type_id',
1640 0 => 'event_type_id',
1642 'localizable' => FALSE,
1643 'sig' => 'civicrm_event::0::event_type_id',
1645 'index_participant_listing_id' => [
1646 'name' => 'index_participant_listing_id',
1648 0 => 'participant_listing_id',
1650 'localizable' => FALSE,
1651 'sig' => 'civicrm_event::0::participant_listing_id',
1653 'index_parent_event_id' => [
1654 'name' => 'index_parent_event_id',
1656 0 => 'parent_event_id',
1658 'localizable' => FALSE,
1659 'sig' => 'civicrm_event::0::parent_event_id',
1662 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;