5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Event/Event.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:331a210ceb36b5e9460705dbfbe71abf)
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 public static $_tableName = 'civicrm_event';
25 * Icon associated with this entity.
29 public static $_icon = 'fa-calendar';
32 * Should CiviCRM log any modifications to this table in the civicrm_log table.
36 public static $_log = TRUE;
46 * Event Title (e.g. Fall Fundraiser Dinner)
53 * 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.
60 * Full description of event. Text and html allowed. Displayed on built-in Event Information screens.
67 * Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.
71 public $event_type_id;
74 * Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.
78 public $participant_listing_id;
81 * Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.
88 * Date and time that event starts.
95 * Date and time that event ends. May be NULL if no defined end date/time
102 * If true, include registration link on Event Info page.
106 public $is_online_registration;
109 * Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.
113 public $registration_link_text;
116 * Date and time that online registration starts.
120 public $registration_start_date;
123 * Date and time that online registration ends.
127 public $registration_end_date;
130 * 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.
134 public $max_participants;
137 * 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.
141 public $event_full_text;
144 * If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.
151 * Financial type assigned to paid event registrations for this event. Required if is_monetary is true.
155 public $financial_type_id;
158 * Payment Processors configured for this Event (if is_monetary is true)
162 public $payment_processor;
165 * Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?
172 * Is this Event enabled or disabled/cancelled?
184 * If true, show event location.
188 public $is_show_location;
191 * FK to Location Block ID
195 public $loc_block_id;
198 * Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.
202 public $default_role_id;
205 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
212 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
219 * Title for Confirmation page.
223 public $confirm_title;
226 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
230 public $confirm_text;
233 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
237 public $confirm_footer_text;
240 * If true, confirmation is automatically emailed to contact on successful registration.
244 public $is_email_confirm;
247 * text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now
251 public $confirm_email_text;
254 * FROM email name used for confirmation emails.
258 public $confirm_from_name;
261 * FROM email address used for confirmation emails.
265 public $confirm_from_email;
268 * comma-separated list of email addresses to cc each time a confirmation is sent
275 * comma-separated list of email addresses to bcc each time a confirmation is sent
282 * FK to civicrm_option_value.
286 public $default_fee_id;
289 * FK to civicrm_option_value.
293 public $default_discount_fee_id;
296 * Title for ThankYou page.
300 public $thankyou_title;
307 public $thankyou_text;
314 public $thankyou_footer_text;
317 * if true - allows the user to send payment directly to the org later
321 public $is_pay_later;
324 * The text displayed to the user in the main form
328 public $pay_later_text;
331 * The receipt sent to the user instead of the normal receipt text
335 public $pay_later_receipt;
338 * is partial payment enabled for this event
342 public $is_partial_payment;
345 * Initial amount label for partial payment
349 public $initial_amount_label;
352 * Initial amount help text for partial payment
356 public $initial_amount_help_text;
359 * Minimum initial amount for partial payment
363 public $min_initial_amount;
366 * if true - allows the user to register multiple participants for event
370 public $is_multiple_registrations;
373 * Maximum number of additional participants that can be registered on a single booking
377 public $max_additional_participants;
380 * if true - allows the user to register multiple registrations from same email address.
384 public $allow_same_participant_emails;
387 * Whether the event has waitlist support.
391 public $has_waitlist;
394 * Whether participants require approval before they can finish registering.
398 public $requires_approval;
401 * Expire pending but unconfirmed registrations after this many hours.
405 public $expiration_time;
408 * Allow self service cancellation or transfer for event?
412 public $allow_selfcancelxfer;
415 * Number of hours prior to event start date to allow self-service cancellation or transfer.
419 public $selfcancelxfer_time;
422 * Text to display when the event is full, but participants can signup for a waitlist.
426 public $waitlist_text;
429 * Text to display when the approval is required to complete registration for an event.
433 public $approval_req_text;
436 * whether the event has template
443 * Event Template Title
447 public $template_title;
450 * FK to civicrm_contact, who created this event
457 * Date and time that event was created.
461 public $created_date;
464 * 3 character string, value from config setting or input via user.
471 * The campaign for which this event has been created.
478 * Can people share the event through social media?
485 * If false, the event booking confirmation screen gets skipped
489 public $is_confirm_enabled;
492 * Implicit FK to civicrm_event: parent event
496 public $parent_event_id;
499 * Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.
503 public $slot_label_id;
506 * Rule to use when matching registrations for this event
510 public $dedupe_rule_group_id;
513 * if true than billing block is required this event
517 public $is_billing_required;
522 public function __construct() {
523 $this->__table
= 'civicrm_event';
524 parent
::__construct();
528 * Returns localized title of this entity.
530 public static function getEntityTitle() {
535 * Returns foreign keys and entity references.
538 * [CRM_Core_Reference_Interface]
540 public static function getReferenceColumns() {
541 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
542 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
543 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'loc_block_id', 'civicrm_loc_block', 'id');
544 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'created_id', 'civicrm_contact', 'id');
545 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
546 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'dedupe_rule_group_id', 'civicrm_dedupe_rule_group', 'id');
547 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
549 return Civi
::$statics[__CLASS__
]['links'];
553 * Returns all the column names of this table
557 public static function &fields() {
558 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
559 Civi
::$statics[__CLASS__
]['fields'] = [
562 'type' => CRM_Utils_Type
::T_INT
,
563 'title' => ts('Event ID'),
564 'description' => ts('Event'),
566 'where' => 'civicrm_event.id',
567 'table_name' => 'civicrm_event',
569 'bao' => 'CRM_Event_BAO_Event',
575 'type' => CRM_Utils_Type
::T_STRING
,
576 'title' => ts('Event Title'),
577 'description' => ts('Event Title (e.g. Fall Fundraiser Dinner)'),
579 'size' => CRM_Utils_Type
::HUGE
,
581 'where' => 'civicrm_event.title',
582 'headerPattern' => '/(event.)?title$/i',
584 'table_name' => 'civicrm_event',
586 'bao' => 'CRM_Event_BAO_Event',
595 'type' => CRM_Utils_Type
::T_TEXT
,
596 'title' => ts('Event Summary'),
597 '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.'),
600 'where' => 'civicrm_event.summary',
601 'table_name' => 'civicrm_event',
603 'bao' => 'CRM_Event_BAO_Event',
606 'type' => 'TextArea',
610 'event_description' => [
611 'name' => 'description',
612 'type' => CRM_Utils_Type
::T_TEXT
,
613 'title' => ts('Event Description'),
614 'description' => ts('Full description of event. Text and html allowed. Displayed on built-in Event Information screens.'),
617 'where' => 'civicrm_event.description',
618 'table_name' => 'civicrm_event',
620 'bao' => 'CRM_Event_BAO_Event',
623 'type' => 'RichTextEditor',
628 'name' => 'event_type_id',
629 'type' => CRM_Utils_Type
::T_INT
,
630 'title' => ts('Event Type'),
631 'description' => ts('Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.'),
632 'where' => 'civicrm_event.event_type_id',
634 'table_name' => 'civicrm_event',
636 'bao' => 'CRM_Event_BAO_Event',
641 'pseudoconstant' => [
642 'optionGroupName' => 'event_type',
643 'optionEditPath' => 'civicrm/admin/options/event_type',
647 'participant_listing_id' => [
648 'name' => 'participant_listing_id',
649 'type' => CRM_Utils_Type
::T_INT
,
650 'title' => ts('Participant Listing'),
651 'description' => ts('Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.'),
652 'where' => 'civicrm_event.participant_listing_id',
654 'table_name' => 'civicrm_event',
656 'bao' => 'CRM_Event_BAO_Event',
661 'pseudoconstant' => [
662 'optionGroupName' => 'participant_listing',
663 'optionEditPath' => 'civicrm/admin/options/participant_listing',
668 'name' => 'is_public',
669 'type' => CRM_Utils_Type
::T_BOOLEAN
,
670 'title' => ts('Is Event Public'),
671 'description' => ts('Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.'),
672 'where' => 'civicrm_event.is_public',
674 'table_name' => 'civicrm_event',
676 'bao' => 'CRM_Event_BAO_Event',
679 'type' => 'CheckBox',
683 'event_start_date' => [
684 'name' => 'start_date',
685 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
686 'title' => ts('Event Start Date'),
687 'description' => ts('Date and time that event starts.'),
689 'where' => 'civicrm_event.start_date',
690 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
692 'table_name' => 'civicrm_event',
694 'bao' => 'CRM_Event_BAO_Event',
697 'type' => 'Select Date',
698 'formatType' => 'activityDateTime',
702 'event_end_date' => [
703 'name' => 'end_date',
704 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
705 'title' => ts('Event End Date'),
706 'description' => ts('Date and time that event ends. May be NULL if no defined end date/time'),
708 'where' => 'civicrm_event.end_date',
709 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
711 'table_name' => 'civicrm_event',
713 'bao' => 'CRM_Event_BAO_Event',
716 'type' => 'Select Date',
717 'formatType' => 'activityDateTime',
721 'is_online_registration' => [
722 'name' => 'is_online_registration',
723 'type' => CRM_Utils_Type
::T_BOOLEAN
,
724 'title' => ts('Is Online Registration'),
725 'description' => ts('If true, include registration link on Event Info page.'),
726 'where' => 'civicrm_event.is_online_registration',
728 'table_name' => 'civicrm_event',
730 'bao' => 'CRM_Event_BAO_Event',
733 'type' => 'CheckBox',
737 'registration_link_text' => [
738 'name' => 'registration_link_text',
739 'type' => CRM_Utils_Type
::T_STRING
,
740 'title' => ts('Event Registration Link Text'),
741 'description' => ts('Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.'),
743 'size' => CRM_Utils_Type
::HUGE
,
744 'where' => 'civicrm_event.registration_link_text',
745 'table_name' => 'civicrm_event',
747 'bao' => 'CRM_Event_BAO_Event',
754 'registration_start_date' => [
755 'name' => 'registration_start_date',
756 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
757 'title' => ts('Registration Start Date'),
758 'description' => ts('Date and time that online registration starts.'),
759 'where' => 'civicrm_event.registration_start_date',
760 'table_name' => 'civicrm_event',
762 'bao' => 'CRM_Event_BAO_Event',
765 'type' => 'Select Date',
766 'formatType' => 'activityDateTime',
770 'registration_end_date' => [
771 'name' => 'registration_end_date',
772 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
773 'title' => ts('Registration End Date'),
774 'description' => ts('Date and time that online registration ends.'),
775 'where' => 'civicrm_event.registration_end_date',
776 'table_name' => 'civicrm_event',
778 'bao' => 'CRM_Event_BAO_Event',
781 'type' => 'Select Date',
782 'formatType' => 'activityDateTime',
786 'max_participants' => [
787 'name' => 'max_participants',
788 'type' => CRM_Utils_Type
::T_INT
,
789 'title' => ts('Max Participants'),
790 '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.'),
791 'where' => 'civicrm_event.max_participants',
793 'table_name' => 'civicrm_event',
795 'bao' => 'CRM_Event_BAO_Event',
802 'event_full_text' => [
803 'name' => 'event_full_text',
804 'type' => CRM_Utils_Type
::T_TEXT
,
805 'title' => ts('Event Information'),
806 '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.'),
809 'where' => 'civicrm_event.event_full_text',
810 'table_name' => 'civicrm_event',
812 'bao' => 'CRM_Event_BAO_Event',
815 'type' => 'TextArea',
820 'name' => 'is_monetary',
821 'type' => CRM_Utils_Type
::T_BOOLEAN
,
822 'title' => ts('Is this a PAID event?'),
823 'description' => ts('If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.'),
824 'where' => 'civicrm_event.is_monetary',
826 'table_name' => 'civicrm_event',
828 'bao' => 'CRM_Event_BAO_Event',
831 'type' => 'CheckBox',
835 'financial_type_id' => [
836 'name' => 'financial_type_id',
837 'type' => CRM_Utils_Type
::T_INT
,
838 'title' => ts('Financial Type'),
839 'description' => ts('Financial type assigned to paid event registrations for this event. Required if is_monetary is true.'),
840 'where' => 'civicrm_event.financial_type_id',
842 'table_name' => 'civicrm_event',
844 'bao' => 'CRM_Event_BAO_Event',
849 'pseudoconstant' => [
850 'table' => 'civicrm_financial_type',
852 'labelColumn' => 'name',
856 'payment_processor' => [
857 'name' => 'payment_processor',
858 'type' => CRM_Utils_Type
::T_STRING
,
859 'title' => ts('Payment Processor'),
860 'description' => ts('Payment Processors configured for this Event (if is_monetary is true)'),
862 'size' => CRM_Utils_Type
::HUGE
,
863 'where' => 'civicrm_event.payment_processor',
864 'table_name' => 'civicrm_event',
866 'bao' => 'CRM_Event_BAO_Event',
871 'pseudoconstant' => [
872 'table' => 'civicrm_payment_processor',
874 'labelColumn' => 'name',
880 'type' => CRM_Utils_Type
::T_BOOLEAN
,
881 'title' => ts('Map Enabled'),
882 'description' => ts('Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?'),
883 'where' => 'civicrm_event.is_map',
885 'table_name' => 'civicrm_event',
887 'bao' => 'CRM_Event_BAO_Event',
890 'type' => 'CheckBox',
895 'name' => 'is_active',
896 'type' => CRM_Utils_Type
::T_BOOLEAN
,
897 'title' => ts('Is Active'),
898 'description' => ts('Is this Event enabled or disabled/cancelled?'),
899 'where' => 'civicrm_event.is_active',
901 'table_name' => 'civicrm_event',
903 'bao' => 'CRM_Event_BAO_Event',
906 'type' => 'CheckBox',
911 'name' => 'fee_label',
912 'type' => CRM_Utils_Type
::T_STRING
,
913 'title' => ts('Fee Label'),
915 'size' => CRM_Utils_Type
::HUGE
,
917 'where' => 'civicrm_event.fee_label',
918 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
920 'table_name' => 'civicrm_event',
922 'bao' => 'CRM_Event_BAO_Event',
929 'is_show_location' => [
930 'name' => 'is_show_location',
931 'type' => CRM_Utils_Type
::T_BOOLEAN
,
932 'title' => ts('show location'),
933 'description' => ts('If true, show event location.'),
934 'where' => 'civicrm_event.is_show_location',
936 'table_name' => 'civicrm_event',
938 'bao' => 'CRM_Event_BAO_Event',
941 'type' => 'CheckBox',
946 'name' => 'loc_block_id',
947 'type' => CRM_Utils_Type
::T_INT
,
948 'title' => ts('Location Block ID'),
949 'description' => ts('FK to Location Block ID'),
950 'where' => 'civicrm_event.loc_block_id',
951 'table_name' => 'civicrm_event',
953 'bao' => 'CRM_Event_BAO_Event',
955 'FKClassName' => 'CRM_Core_DAO_LocBlock',
958 'default_role_id' => [
959 'name' => 'default_role_id',
960 'type' => CRM_Utils_Type
::T_INT
,
961 'title' => ts('Default Role'),
962 'description' => ts('Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.'),
964 'where' => 'civicrm_event.default_role_id',
967 'table_name' => 'civicrm_event',
969 'bao' => 'CRM_Event_BAO_Event',
974 'pseudoconstant' => [
975 'optionGroupName' => 'participant_role',
976 'optionEditPath' => 'civicrm/admin/options/participant_role',
981 'name' => 'intro_text',
982 'type' => CRM_Utils_Type
::T_TEXT
,
983 'title' => ts('Introductory Message'),
984 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
987 'where' => 'civicrm_event.intro_text',
988 'table_name' => 'civicrm_event',
990 'bao' => 'CRM_Event_BAO_Event',
993 'type' => 'RichTextEditor',
998 'name' => 'footer_text',
999 'type' => CRM_Utils_Type
::T_TEXT
,
1000 'title' => ts('Footer Message'),
1001 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
1004 'where' => 'civicrm_event.footer_text',
1005 'table_name' => 'civicrm_event',
1006 'entity' => 'Event',
1007 'bao' => 'CRM_Event_BAO_Event',
1010 'type' => 'RichTextEditor',
1014 'confirm_title' => [
1015 'name' => 'confirm_title',
1016 'type' => CRM_Utils_Type
::T_STRING
,
1017 'title' => ts('Confirmation Title'),
1018 'description' => ts('Title for Confirmation page.'),
1020 'size' => CRM_Utils_Type
::HUGE
,
1021 'where' => 'civicrm_event.confirm_title',
1022 'default' => 'NULL',
1023 'table_name' => 'civicrm_event',
1024 'entity' => 'Event',
1025 'bao' => 'CRM_Event_BAO_Event',
1033 'name' => 'confirm_text',
1034 'type' => CRM_Utils_Type
::T_TEXT
,
1035 'title' => ts('Confirm Text'),
1036 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
1039 'where' => 'civicrm_event.confirm_text',
1040 'table_name' => 'civicrm_event',
1041 'entity' => 'Event',
1042 'bao' => 'CRM_Event_BAO_Event',
1045 'type' => 'RichTextEditor',
1049 'confirm_footer_text' => [
1050 'name' => 'confirm_footer_text',
1051 'type' => CRM_Utils_Type
::T_TEXT
,
1052 'title' => ts('Footer Text'),
1053 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
1056 'where' => 'civicrm_event.confirm_footer_text',
1057 'table_name' => 'civicrm_event',
1058 'entity' => 'Event',
1059 'bao' => 'CRM_Event_BAO_Event',
1062 'type' => 'RichTextEditor',
1066 'is_email_confirm' => [
1067 'name' => 'is_email_confirm',
1068 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1069 'title' => ts('Is confirm email'),
1070 'description' => ts('If true, confirmation is automatically emailed to contact on successful registration.'),
1071 'where' => 'civicrm_event.is_email_confirm',
1073 'table_name' => 'civicrm_event',
1074 'entity' => 'Event',
1075 'bao' => 'CRM_Event_BAO_Event',
1078 'type' => 'CheckBox',
1082 'confirm_email_text' => [
1083 'name' => 'confirm_email_text',
1084 'type' => CRM_Utils_Type
::T_TEXT
,
1085 'title' => ts('Confirmation Email Text'),
1086 'description' => ts('text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now'),
1089 'where' => 'civicrm_event.confirm_email_text',
1090 'table_name' => 'civicrm_event',
1091 'entity' => 'Event',
1092 'bao' => 'CRM_Event_BAO_Event',
1095 'type' => 'TextArea',
1099 'confirm_from_name' => [
1100 'name' => 'confirm_from_name',
1101 'type' => CRM_Utils_Type
::T_STRING
,
1102 'title' => ts('Confirm From Name'),
1103 'description' => ts('FROM email name used for confirmation emails.'),
1105 'size' => CRM_Utils_Type
::HUGE
,
1106 'where' => 'civicrm_event.confirm_from_name',
1107 'table_name' => 'civicrm_event',
1108 'entity' => 'Event',
1109 'bao' => 'CRM_Event_BAO_Event',
1116 'confirm_from_email' => [
1117 'name' => 'confirm_from_email',
1118 'type' => CRM_Utils_Type
::T_STRING
,
1119 'title' => ts('Confirm From Email'),
1120 'description' => ts('FROM email address used for confirmation emails.'),
1122 'size' => CRM_Utils_Type
::HUGE
,
1123 'where' => 'civicrm_event.confirm_from_email',
1124 'table_name' => 'civicrm_event',
1125 'entity' => 'Event',
1126 'bao' => 'CRM_Event_BAO_Event',
1134 'name' => 'cc_confirm',
1135 'type' => CRM_Utils_Type
::T_STRING
,
1136 'title' => ts('Cc Confirm'),
1137 'description' => ts('comma-separated list of email addresses to cc each time a confirmation is sent'),
1139 'size' => CRM_Utils_Type
::HUGE
,
1140 'where' => 'civicrm_event.cc_confirm',
1141 'table_name' => 'civicrm_event',
1142 'entity' => 'Event',
1143 'bao' => 'CRM_Event_BAO_Event',
1151 'name' => 'bcc_confirm',
1152 'type' => CRM_Utils_Type
::T_STRING
,
1153 'title' => ts('Bcc Confirm'),
1154 'description' => ts('comma-separated list of email addresses to bcc each time a confirmation is sent'),
1156 'size' => CRM_Utils_Type
::HUGE
,
1157 'where' => 'civicrm_event.bcc_confirm',
1158 'table_name' => 'civicrm_event',
1159 'entity' => 'Event',
1160 'bao' => 'CRM_Event_BAO_Event',
1167 'default_fee_id' => [
1168 'name' => 'default_fee_id',
1169 'type' => CRM_Utils_Type
::T_INT
,
1170 'title' => ts('Default Fee ID'),
1171 'description' => ts('FK to civicrm_option_value.'),
1172 'where' => 'civicrm_event.default_fee_id',
1173 'table_name' => 'civicrm_event',
1174 'entity' => 'Event',
1175 'bao' => 'CRM_Event_BAO_Event',
1179 'default_discount_fee_id' => [
1180 'name' => 'default_discount_fee_id',
1181 'type' => CRM_Utils_Type
::T_INT
,
1182 'title' => ts('Default Discount Fee ID'),
1183 'description' => ts('FK to civicrm_option_value.'),
1184 'where' => 'civicrm_event.default_discount_fee_id',
1185 'table_name' => 'civicrm_event',
1186 'entity' => 'Event',
1187 'bao' => 'CRM_Event_BAO_Event',
1191 'thankyou_title' => [
1192 'name' => 'thankyou_title',
1193 'type' => CRM_Utils_Type
::T_STRING
,
1194 'title' => ts('ThankYou Title'),
1195 'description' => ts('Title for ThankYou page.'),
1197 'size' => CRM_Utils_Type
::HUGE
,
1198 'where' => 'civicrm_event.thankyou_title',
1199 'default' => 'NULL',
1200 'table_name' => 'civicrm_event',
1201 'entity' => 'Event',
1202 'bao' => 'CRM_Event_BAO_Event',
1209 'thankyou_text' => [
1210 'name' => 'thankyou_text',
1211 'type' => CRM_Utils_Type
::T_TEXT
,
1212 'title' => ts('ThankYou Text'),
1213 'description' => ts('ThankYou Text.'),
1216 'where' => 'civicrm_event.thankyou_text',
1217 'table_name' => 'civicrm_event',
1218 'entity' => 'Event',
1219 'bao' => 'CRM_Event_BAO_Event',
1222 'type' => 'RichTextEditor',
1226 'thankyou_footer_text' => [
1227 'name' => 'thankyou_footer_text',
1228 'type' => CRM_Utils_Type
::T_TEXT
,
1229 'title' => ts('Footer Text'),
1230 'description' => ts('Footer message.'),
1233 'where' => 'civicrm_event.thankyou_footer_text',
1234 'table_name' => 'civicrm_event',
1235 'entity' => 'Event',
1236 'bao' => 'CRM_Event_BAO_Event',
1239 'type' => 'RichTextEditor',
1244 'name' => 'is_pay_later',
1245 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1246 'title' => ts('Pay Later Allowed'),
1247 'description' => ts('if true - allows the user to send payment directly to the org later'),
1248 'where' => 'civicrm_event.is_pay_later',
1250 'table_name' => 'civicrm_event',
1251 'entity' => 'Event',
1252 'bao' => 'CRM_Event_BAO_Event',
1255 'type' => 'CheckBox',
1259 'pay_later_text' => [
1260 'name' => 'pay_later_text',
1261 'type' => CRM_Utils_Type
::T_TEXT
,
1262 'title' => ts('Pay Later Text'),
1263 'description' => ts('The text displayed to the user in the main form'),
1264 'where' => 'civicrm_event.pay_later_text',
1265 'table_name' => 'civicrm_event',
1266 'entity' => 'Event',
1267 'bao' => 'CRM_Event_BAO_Event',
1270 'type' => 'RichTextEditor',
1274 'pay_later_receipt' => [
1275 'name' => 'pay_later_receipt',
1276 'type' => CRM_Utils_Type
::T_TEXT
,
1277 'title' => ts('Pay Later Receipt Text'),
1278 'description' => ts('The receipt sent to the user instead of the normal receipt text'),
1279 'where' => 'civicrm_event.pay_later_receipt',
1280 'table_name' => 'civicrm_event',
1281 'entity' => 'Event',
1282 'bao' => 'CRM_Event_BAO_Event',
1289 'is_partial_payment' => [
1290 'name' => 'is_partial_payment',
1291 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1292 'title' => ts('Partial Payments Enabled'),
1293 'description' => ts('is partial payment enabled for this event'),
1294 'where' => 'civicrm_event.is_partial_payment',
1296 'table_name' => 'civicrm_event',
1297 'entity' => 'Event',
1298 'bao' => 'CRM_Event_BAO_Event',
1301 'type' => 'CheckBox',
1305 'initial_amount_label' => [
1306 'name' => 'initial_amount_label',
1307 'type' => CRM_Utils_Type
::T_STRING
,
1308 'title' => ts('Initial Amount Label'),
1309 'description' => ts('Initial amount label for partial payment'),
1311 'size' => CRM_Utils_Type
::HUGE
,
1312 'where' => 'civicrm_event.initial_amount_label',
1313 'table_name' => 'civicrm_event',
1314 'entity' => 'Event',
1315 'bao' => 'CRM_Event_BAO_Event',
1322 'initial_amount_help_text' => [
1323 'name' => 'initial_amount_help_text',
1324 'type' => CRM_Utils_Type
::T_TEXT
,
1325 'title' => ts('Initial Amount Help Text'),
1326 'description' => ts('Initial amount help text for partial payment'),
1327 'where' => 'civicrm_event.initial_amount_help_text',
1328 'table_name' => 'civicrm_event',
1329 'entity' => 'Event',
1330 'bao' => 'CRM_Event_BAO_Event',
1337 'min_initial_amount' => [
1338 'name' => 'min_initial_amount',
1339 'type' => CRM_Utils_Type
::T_MONEY
,
1340 'title' => ts('Minimum Initial Amount'),
1341 'description' => ts('Minimum initial amount for partial payment'),
1346 'where' => 'civicrm_event.min_initial_amount',
1347 'table_name' => 'civicrm_event',
1348 'entity' => 'Event',
1349 'bao' => 'CRM_Event_BAO_Event',
1356 'is_multiple_registrations' => [
1357 'name' => 'is_multiple_registrations',
1358 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1359 'title' => ts('Allow Multiple Registrations'),
1360 'description' => ts('if true - allows the user to register multiple participants for event'),
1361 'where' => 'civicrm_event.is_multiple_registrations',
1363 'table_name' => 'civicrm_event',
1364 'entity' => 'Event',
1365 'bao' => 'CRM_Event_BAO_Event',
1368 'type' => 'CheckBox',
1372 'max_additional_participants' => [
1373 'name' => 'max_additional_participants',
1374 'type' => CRM_Utils_Type
::T_INT
,
1375 'title' => ts('Maximum number of additional participants per registration'),
1376 'description' => ts('Maximum number of additional participants that can be registered on a single booking'),
1377 'where' => 'civicrm_event.max_additional_participants',
1379 'table_name' => 'civicrm_event',
1380 'entity' => 'Event',
1381 'bao' => 'CRM_Event_BAO_Event',
1385 'allow_same_participant_emails' => [
1386 'name' => 'allow_same_participant_emails',
1387 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1388 'title' => ts('Does Event allow multiple registrations from same email address?'),
1389 'description' => ts('if true - allows the user to register multiple registrations from same email address.'),
1390 'where' => 'civicrm_event.allow_same_participant_emails',
1392 'table_name' => 'civicrm_event',
1393 'entity' => 'Event',
1394 'bao' => 'CRM_Event_BAO_Event',
1397 'type' => 'CheckBox',
1402 'name' => 'has_waitlist',
1403 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1404 'title' => ts('Waitlist Enabled'),
1405 'description' => ts('Whether the event has waitlist support.'),
1406 'where' => 'civicrm_event.has_waitlist',
1407 'table_name' => 'civicrm_event',
1408 'entity' => 'Event',
1409 'bao' => 'CRM_Event_BAO_Event',
1412 'type' => 'CheckBox',
1416 'requires_approval' => [
1417 'name' => 'requires_approval',
1418 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1419 'title' => ts('Requires Approval'),
1420 'description' => ts('Whether participants require approval before they can finish registering.'),
1421 'where' => 'civicrm_event.requires_approval',
1422 'table_name' => 'civicrm_event',
1423 'entity' => 'Event',
1424 'bao' => 'CRM_Event_BAO_Event',
1427 'type' => 'CheckBox',
1431 'expiration_time' => [
1432 'name' => 'expiration_time',
1433 'type' => CRM_Utils_Type
::T_INT
,
1434 'title' => ts('Expiration Time'),
1435 'description' => ts('Expire pending but unconfirmed registrations after this many hours.'),
1436 'where' => 'civicrm_event.expiration_time',
1437 'table_name' => 'civicrm_event',
1438 'entity' => 'Event',
1439 'bao' => 'CRM_Event_BAO_Event',
1446 'allow_selfcancelxfer' => [
1447 'name' => 'allow_selfcancelxfer',
1448 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1449 'title' => ts('Allow Self-service Cancellation or Transfer'),
1450 'description' => ts('Allow self service cancellation or transfer for event?'),
1451 'where' => 'civicrm_event.allow_selfcancelxfer',
1453 'table_name' => 'civicrm_event',
1454 'entity' => 'Event',
1455 'bao' => 'CRM_Event_BAO_Event',
1458 'type' => 'CheckBox',
1462 'selfcancelxfer_time' => [
1463 'name' => 'selfcancelxfer_time',
1464 'type' => CRM_Utils_Type
::T_INT
,
1465 'title' => ts('Self-service Cancellation or Transfer Time'),
1466 'description' => ts('Number of hours prior to event start date to allow self-service cancellation or transfer.'),
1467 'where' => 'civicrm_event.selfcancelxfer_time',
1469 'table_name' => 'civicrm_event',
1470 'entity' => 'Event',
1471 'bao' => 'CRM_Event_BAO_Event',
1478 'waitlist_text' => [
1479 'name' => 'waitlist_text',
1480 'type' => CRM_Utils_Type
::T_TEXT
,
1481 'title' => ts('Waitlist Text'),
1482 'description' => ts('Text to display when the event is full, but participants can signup for a waitlist.'),
1485 'where' => 'civicrm_event.waitlist_text',
1486 'table_name' => 'civicrm_event',
1487 'entity' => 'Event',
1488 'bao' => 'CRM_Event_BAO_Event',
1491 'type' => 'TextArea',
1495 'approval_req_text' => [
1496 'name' => 'approval_req_text',
1497 'type' => CRM_Utils_Type
::T_TEXT
,
1498 'title' => ts('Approval Req Text'),
1499 'description' => ts('Text to display when the approval is required to complete registration for an event.'),
1502 'where' => 'civicrm_event.approval_req_text',
1503 'table_name' => 'civicrm_event',
1504 'entity' => 'Event',
1505 'bao' => 'CRM_Event_BAO_Event',
1508 'type' => 'TextArea',
1513 'name' => 'is_template',
1514 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1515 'title' => ts('Is an Event Template'),
1516 'description' => ts('whether the event has template'),
1518 'where' => 'civicrm_event.is_template',
1520 'table_name' => 'civicrm_event',
1521 'entity' => 'Event',
1522 'bao' => 'CRM_Event_BAO_Event',
1525 'type' => 'CheckBox',
1529 'template_title' => [
1530 'name' => 'template_title',
1531 'type' => CRM_Utils_Type
::T_STRING
,
1532 'title' => ts('Event Template Title'),
1533 'description' => ts('Event Template Title'),
1535 'size' => CRM_Utils_Type
::HUGE
,
1537 'where' => 'civicrm_event.template_title',
1538 'headerPattern' => '/(template.)?title$/i',
1540 'table_name' => 'civicrm_event',
1541 'entity' => 'Event',
1542 'bao' => 'CRM_Event_BAO_Event',
1550 'name' => 'created_id',
1551 'type' => CRM_Utils_Type
::T_INT
,
1552 'title' => ts('Created By Contact ID'),
1553 'description' => ts('FK to civicrm_contact, who created this event'),
1554 'where' => 'civicrm_event.created_id',
1555 'table_name' => 'civicrm_event',
1556 'entity' => 'Event',
1557 'bao' => 'CRM_Event_BAO_Event',
1559 'FKClassName' => 'CRM_Contact_DAO_Contact',
1563 'name' => 'created_date',
1564 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
1565 'title' => ts('Event Created Date'),
1566 'description' => ts('Date and time that event was created.'),
1567 'where' => 'civicrm_event.created_date',
1568 'table_name' => 'civicrm_event',
1569 'entity' => 'Event',
1570 'bao' => 'CRM_Event_BAO_Event',
1575 'name' => 'currency',
1576 'type' => CRM_Utils_Type
::T_STRING
,
1577 'title' => ts('Currency'),
1578 'description' => ts('3 character string, value from config setting or input via user.'),
1580 'size' => CRM_Utils_Type
::FOUR
,
1582 'where' => 'civicrm_event.currency',
1583 'headerPattern' => '/cur(rency)?/i',
1584 'dataPattern' => '/^[A-Z]{3}$/i',
1586 'table_name' => 'civicrm_event',
1587 'entity' => 'Event',
1588 'bao' => 'CRM_Event_BAO_Event',
1593 'pseudoconstant' => [
1594 'table' => 'civicrm_currency',
1595 'keyColumn' => 'name',
1596 'labelColumn' => 'full_name',
1597 'nameColumn' => 'name',
1598 'abbrColumn' => 'symbol',
1603 'name' => 'campaign_id',
1604 'type' => CRM_Utils_Type
::T_INT
,
1605 'title' => ts('Campaign'),
1606 'description' => ts('The campaign for which this event has been created.'),
1607 'where' => 'civicrm_event.campaign_id',
1608 'table_name' => 'civicrm_event',
1609 'entity' => 'Event',
1610 'bao' => 'CRM_Event_BAO_Event',
1612 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1614 'type' => 'EntityRef',
1616 'pseudoconstant' => [
1617 'table' => 'civicrm_campaign',
1618 'keyColumn' => 'id',
1619 'labelColumn' => 'title',
1624 'name' => 'is_share',
1625 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1626 'title' => ts('Is shared through social media'),
1627 'description' => ts('Can people share the event through social media?'),
1628 'where' => 'civicrm_event.is_share',
1630 'table_name' => 'civicrm_event',
1631 'entity' => 'Event',
1632 'bao' => 'CRM_Event_BAO_Event',
1635 'type' => 'CheckBox',
1639 'is_confirm_enabled' => [
1640 'name' => 'is_confirm_enabled',
1641 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1642 'title' => ts('Is the booking confirmation screen enabled?'),
1643 'description' => ts('If false, the event booking confirmation screen gets skipped'),
1644 'where' => 'civicrm_event.is_confirm_enabled',
1646 'table_name' => 'civicrm_event',
1647 'entity' => 'Event',
1648 'bao' => 'CRM_Event_BAO_Event',
1651 'type' => 'CheckBox',
1655 'parent_event_id' => [
1656 'name' => 'parent_event_id',
1657 'type' => CRM_Utils_Type
::T_INT
,
1658 'title' => ts('Parent Event ID'),
1659 'description' => ts('Implicit FK to civicrm_event: parent event'),
1660 'where' => 'civicrm_event.parent_event_id',
1661 'default' => 'NULL',
1662 'table_name' => 'civicrm_event',
1663 'entity' => 'Event',
1664 'bao' => 'CRM_Event_BAO_Event',
1667 'type' => 'EntityRef',
1671 'slot_label_id' => [
1672 'name' => 'slot_label_id',
1673 'type' => CRM_Utils_Type
::T_INT
,
1674 'title' => ts('Subevent Slot Label ID'),
1675 'description' => ts('Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.'),
1676 'where' => 'civicrm_event.slot_label_id',
1677 'default' => 'NULL',
1678 'table_name' => 'civicrm_event',
1679 'entity' => 'Event',
1680 'bao' => 'CRM_Event_BAO_Event',
1687 'dedupe_rule_group_id' => [
1688 'name' => 'dedupe_rule_group_id',
1689 'type' => CRM_Utils_Type
::T_INT
,
1690 'title' => ts('Dedupe Rule'),
1691 'description' => ts('Rule to use when matching registrations for this event'),
1692 'where' => 'civicrm_event.dedupe_rule_group_id',
1693 'default' => 'NULL',
1694 'table_name' => 'civicrm_event',
1695 'entity' => 'Event',
1696 'bao' => 'CRM_Event_BAO_Event',
1698 'FKClassName' => 'CRM_Dedupe_DAO_RuleGroup',
1702 'pseudoconstant' => [
1703 'table' => 'civicrm_dedupe_rule_group',
1704 'keyColumn' => 'id',
1705 'labelColumn' => 'title',
1706 'nameColumn' => 'name',
1710 'is_billing_required' => [
1711 'name' => 'is_billing_required',
1712 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1713 'title' => ts('Is billing block required'),
1714 'description' => ts('if true than billing block is required this event'),
1715 'where' => 'civicrm_event.is_billing_required',
1717 'table_name' => 'civicrm_event',
1718 'entity' => 'Event',
1719 'bao' => 'CRM_Event_BAO_Event',
1722 'type' => 'CheckBox',
1727 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1729 return Civi
::$statics[__CLASS__
]['fields'];
1733 * Return a mapping from field-name to the corresponding key (as used in fields()).
1736 * Array(string $name => string $uniqueName).
1738 public static function &fieldKeys() {
1739 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1740 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1742 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1746 * Returns the names of this table
1750 public static function getTableName() {
1751 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1755 * Returns if this table needs to be logged
1759 public function getLog() {
1764 * Returns the list of fields that can be imported
1766 * @param bool $prefix
1770 public static function &import($prefix = FALSE) {
1771 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'event', $prefix, []);
1776 * Returns the list of fields that can be exported
1778 * @param bool $prefix
1782 public static function &export($prefix = FALSE) {
1783 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'event', $prefix, []);
1788 * Returns the list of indices
1790 * @param bool $localize
1794 public static function indices($localize = TRUE) {
1796 'index_event_type_id' => [
1797 'name' => 'index_event_type_id',
1799 0 => 'event_type_id',
1801 'localizable' => FALSE,
1802 'sig' => 'civicrm_event::0::event_type_id',
1804 'index_participant_listing_id' => [
1805 'name' => 'index_participant_listing_id',
1807 0 => 'participant_listing_id',
1809 'localizable' => FALSE,
1810 'sig' => 'civicrm_event::0::participant_listing_id',
1812 'index_parent_event_id' => [
1813 'name' => 'index_parent_event_id',
1815 0 => 'parent_event_id',
1817 'localizable' => FALSE,
1818 'sig' => 'civicrm_event::0::parent_event_id',
1821 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;