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:82ba48cbb804cf6f4b26fa50f07d44db)
13 * Database access object for the Event entity.
15 class CRM_Event_DAO_Event
extends CRM_Core_DAO
{
16 const EXT
= 'civicrm';
17 const TABLE_ADDED
= '1.7';
20 * Static instance to hold the table name.
24 public static $_tableName = 'civicrm_event';
27 * Icon associated with this entity.
31 public static $_icon = 'fa-calendar';
34 * Should CiviCRM log any modifications to this table in the civicrm_log table.
38 public static $_log = TRUE;
48 * Event Title (e.g. Fall Fundraiser Dinner)
55 * 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.
62 * Full description of event. Text and html allowed. Displayed on built-in Event Information screens.
69 * Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.
73 public $event_type_id;
76 * Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.
80 public $participant_listing_id;
83 * Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.
90 * Date and time that event starts.
97 * Date and time that event ends. May be NULL if no defined end date/time
104 * If true, include registration link on Event Info page.
108 public $is_online_registration;
111 * Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.
115 public $registration_link_text;
118 * Date and time that online registration starts.
122 public $registration_start_date;
125 * Date and time that online registration ends.
129 public $registration_end_date;
132 * 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.
136 public $max_participants;
139 * 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.
143 public $event_full_text;
146 * If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.
153 * Financial type assigned to paid event registrations for this event. Required if is_monetary is true.
157 public $financial_type_id;
160 * Payment Processors configured for this Event (if is_monetary is true)
164 public $payment_processor;
167 * Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?
174 * Is this Event enabled or disabled/cancelled?
186 * If true, show event location.
190 public $is_show_location;
193 * FK to Location Block ID
197 public $loc_block_id;
200 * Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.
204 public $default_role_id;
207 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
214 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
221 * Title for Confirmation page.
225 public $confirm_title;
228 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
232 public $confirm_text;
235 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
239 public $confirm_footer_text;
242 * If true, confirmation is automatically emailed to contact on successful registration.
246 public $is_email_confirm;
249 * text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now
253 public $confirm_email_text;
256 * FROM email name used for confirmation emails.
260 public $confirm_from_name;
263 * FROM email address used for confirmation emails.
267 public $confirm_from_email;
270 * comma-separated list of email addresses to cc each time a confirmation is sent
277 * comma-separated list of email addresses to bcc each time a confirmation is sent
284 * FK to civicrm_option_value.
288 public $default_fee_id;
291 * FK to civicrm_option_value.
295 public $default_discount_fee_id;
298 * Title for ThankYou page.
302 public $thankyou_title;
309 public $thankyou_text;
316 public $thankyou_footer_text;
319 * if true - allows the user to send payment directly to the org later
323 public $is_pay_later;
326 * The text displayed to the user in the main form
330 public $pay_later_text;
333 * The receipt sent to the user instead of the normal receipt text
337 public $pay_later_receipt;
340 * is partial payment enabled for this event
344 public $is_partial_payment;
347 * Initial amount label for partial payment
351 public $initial_amount_label;
354 * Initial amount help text for partial payment
358 public $initial_amount_help_text;
361 * Minimum initial amount for partial payment
365 public $min_initial_amount;
368 * if true - allows the user to register multiple participants for event
372 public $is_multiple_registrations;
375 * Maximum number of additional participants that can be registered on a single booking
379 public $max_additional_participants;
382 * if true - allows the user to register multiple registrations from same email address.
386 public $allow_same_participant_emails;
389 * Whether the event has waitlist support.
393 public $has_waitlist;
396 * Whether participants require approval before they can finish registering.
400 public $requires_approval;
403 * Expire pending but unconfirmed registrations after this many hours.
407 public $expiration_time;
410 * Allow self service cancellation or transfer for event?
414 public $allow_selfcancelxfer;
417 * Number of hours prior to event start date to allow self-service cancellation or transfer.
421 public $selfcancelxfer_time;
424 * Text to display when the event is full, but participants can signup for a waitlist.
428 public $waitlist_text;
431 * Text to display when the approval is required to complete registration for an event.
435 public $approval_req_text;
438 * whether the event has template
445 * Event Template Title
449 public $template_title;
452 * FK to civicrm_contact, who created this event
459 * Date and time that event was created.
463 public $created_date;
466 * 3 character string, value from config setting or input via user.
473 * The campaign for which this event has been created.
480 * Can people share the event through social media?
487 * If false, the event booking confirmation screen gets skipped
491 public $is_confirm_enabled;
494 * Implicit FK to civicrm_event: parent event
498 public $parent_event_id;
501 * Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.
505 public $slot_label_id;
508 * Rule to use when matching registrations for this event
512 public $dedupe_rule_group_id;
515 * if true than billing block is required this event
519 public $is_billing_required;
524 public function __construct() {
525 $this->__table
= 'civicrm_event';
526 parent
::__construct();
530 * Returns localized title of this entity.
532 public static function getEntityTitle() {
537 * Returns foreign keys and entity references.
540 * [CRM_Core_Reference_Interface]
542 public static function getReferenceColumns() {
543 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
544 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
545 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'loc_block_id', 'civicrm_loc_block', 'id');
546 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'created_id', 'civicrm_contact', 'id');
547 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
548 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'dedupe_rule_group_id', 'civicrm_dedupe_rule_group', 'id');
549 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
551 return Civi
::$statics[__CLASS__
]['links'];
555 * Returns all the column names of this table
559 public static function &fields() {
560 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
561 Civi
::$statics[__CLASS__
]['fields'] = [
564 'type' => CRM_Utils_Type
::T_INT
,
565 'title' => ts('Event ID'),
566 'description' => ts('Event'),
568 'where' => 'civicrm_event.id',
569 'table_name' => 'civicrm_event',
571 'bao' => 'CRM_Event_BAO_Event',
577 'type' => CRM_Utils_Type
::T_STRING
,
578 'title' => ts('Event Title'),
579 'description' => ts('Event Title (e.g. Fall Fundraiser Dinner)'),
581 'size' => CRM_Utils_Type
::HUGE
,
583 'where' => 'civicrm_event.title',
584 'headerPattern' => '/(event.)?title$/i',
586 'table_name' => 'civicrm_event',
588 'bao' => 'CRM_Event_BAO_Event',
597 'type' => CRM_Utils_Type
::T_TEXT
,
598 'title' => ts('Event Summary'),
599 '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.'),
602 'where' => 'civicrm_event.summary',
603 'table_name' => 'civicrm_event',
605 'bao' => 'CRM_Event_BAO_Event',
608 'type' => 'TextArea',
612 'event_description' => [
613 'name' => 'description',
614 'type' => CRM_Utils_Type
::T_TEXT
,
615 'title' => ts('Event Description'),
616 'description' => ts('Full description of event. Text and html allowed. Displayed on built-in Event Information screens.'),
619 'where' => 'civicrm_event.description',
620 'table_name' => 'civicrm_event',
622 'bao' => 'CRM_Event_BAO_Event',
625 'type' => 'RichTextEditor',
630 'name' => 'event_type_id',
631 'type' => CRM_Utils_Type
::T_INT
,
632 'title' => ts('Event Type'),
633 'description' => ts('Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.'),
634 'where' => 'civicrm_event.event_type_id',
636 'table_name' => 'civicrm_event',
638 'bao' => 'CRM_Event_BAO_Event',
643 'pseudoconstant' => [
644 'optionGroupName' => 'event_type',
645 'optionEditPath' => 'civicrm/admin/options/event_type',
649 'participant_listing_id' => [
650 'name' => 'participant_listing_id',
651 'type' => CRM_Utils_Type
::T_INT
,
652 'title' => ts('Participant Listing'),
653 'description' => ts('Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.'),
654 'where' => 'civicrm_event.participant_listing_id',
656 'table_name' => 'civicrm_event',
658 'bao' => 'CRM_Event_BAO_Event',
663 'pseudoconstant' => [
664 'optionGroupName' => 'participant_listing',
665 'optionEditPath' => 'civicrm/admin/options/participant_listing',
670 'name' => 'is_public',
671 'type' => CRM_Utils_Type
::T_BOOLEAN
,
672 'title' => ts('Is Event Public'),
673 'description' => ts('Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.'),
674 'where' => 'civicrm_event.is_public',
676 'table_name' => 'civicrm_event',
678 'bao' => 'CRM_Event_BAO_Event',
681 'type' => 'CheckBox',
685 'event_start_date' => [
686 'name' => 'start_date',
687 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
688 'title' => ts('Event Start Date'),
689 'description' => ts('Date and time that event starts.'),
691 'where' => 'civicrm_event.start_date',
692 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
694 'table_name' => 'civicrm_event',
696 'bao' => 'CRM_Event_BAO_Event',
699 'type' => 'Select Date',
700 'formatType' => 'activityDateTime',
704 'event_end_date' => [
705 'name' => 'end_date',
706 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
707 'title' => ts('Event End Date'),
708 'description' => ts('Date and time that event ends. May be NULL if no defined end date/time'),
710 'where' => 'civicrm_event.end_date',
711 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
713 'table_name' => 'civicrm_event',
715 'bao' => 'CRM_Event_BAO_Event',
718 'type' => 'Select Date',
719 'formatType' => 'activityDateTime',
723 'is_online_registration' => [
724 'name' => 'is_online_registration',
725 'type' => CRM_Utils_Type
::T_BOOLEAN
,
726 'title' => ts('Is Online Registration'),
727 'description' => ts('If true, include registration link on Event Info page.'),
728 'where' => 'civicrm_event.is_online_registration',
730 'table_name' => 'civicrm_event',
732 'bao' => 'CRM_Event_BAO_Event',
735 'type' => 'CheckBox',
739 'registration_link_text' => [
740 'name' => 'registration_link_text',
741 'type' => CRM_Utils_Type
::T_STRING
,
742 'title' => ts('Event Registration Link Text'),
743 'description' => ts('Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.'),
745 'size' => CRM_Utils_Type
::HUGE
,
746 'where' => 'civicrm_event.registration_link_text',
747 'table_name' => 'civicrm_event',
749 'bao' => 'CRM_Event_BAO_Event',
756 'registration_start_date' => [
757 'name' => 'registration_start_date',
758 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
759 'title' => ts('Registration Start Date'),
760 'description' => ts('Date and time that online registration starts.'),
761 'where' => 'civicrm_event.registration_start_date',
762 'table_name' => 'civicrm_event',
764 'bao' => 'CRM_Event_BAO_Event',
767 'type' => 'Select Date',
768 'formatType' => 'activityDateTime',
772 'registration_end_date' => [
773 'name' => 'registration_end_date',
774 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
775 'title' => ts('Registration End Date'),
776 'description' => ts('Date and time that online registration ends.'),
777 'where' => 'civicrm_event.registration_end_date',
778 'table_name' => 'civicrm_event',
780 'bao' => 'CRM_Event_BAO_Event',
783 'type' => 'Select Date',
784 'formatType' => 'activityDateTime',
788 'max_participants' => [
789 'name' => 'max_participants',
790 'type' => CRM_Utils_Type
::T_INT
,
791 'title' => ts('Max Participants'),
792 '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.'),
793 'where' => 'civicrm_event.max_participants',
795 'table_name' => 'civicrm_event',
797 'bao' => 'CRM_Event_BAO_Event',
804 'event_full_text' => [
805 'name' => 'event_full_text',
806 'type' => CRM_Utils_Type
::T_TEXT
,
807 'title' => ts('Event Information'),
808 '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.'),
811 'where' => 'civicrm_event.event_full_text',
812 'table_name' => 'civicrm_event',
814 'bao' => 'CRM_Event_BAO_Event',
817 'type' => 'TextArea',
822 'name' => 'is_monetary',
823 'type' => CRM_Utils_Type
::T_BOOLEAN
,
824 'title' => ts('Is this a PAID event?'),
825 'description' => ts('If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.'),
826 'where' => 'civicrm_event.is_monetary',
828 'table_name' => 'civicrm_event',
830 'bao' => 'CRM_Event_BAO_Event',
833 'type' => 'CheckBox',
837 'financial_type_id' => [
838 'name' => 'financial_type_id',
839 'type' => CRM_Utils_Type
::T_INT
,
840 'title' => ts('Financial Type'),
841 'description' => ts('Financial type assigned to paid event registrations for this event. Required if is_monetary is true.'),
842 'where' => 'civicrm_event.financial_type_id',
844 'table_name' => 'civicrm_event',
846 'bao' => 'CRM_Event_BAO_Event',
851 'pseudoconstant' => [
852 'table' => 'civicrm_financial_type',
854 'labelColumn' => 'name',
858 'payment_processor' => [
859 'name' => 'payment_processor',
860 'type' => CRM_Utils_Type
::T_STRING
,
861 'title' => ts('Payment Processor'),
862 'description' => ts('Payment Processors configured for this Event (if is_monetary is true)'),
864 'size' => CRM_Utils_Type
::HUGE
,
865 'where' => 'civicrm_event.payment_processor',
866 'table_name' => 'civicrm_event',
868 'bao' => 'CRM_Event_BAO_Event',
870 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
874 'pseudoconstant' => [
875 'table' => 'civicrm_payment_processor',
877 'labelColumn' => 'name',
883 'type' => CRM_Utils_Type
::T_BOOLEAN
,
884 'title' => ts('Map Enabled'),
885 'description' => ts('Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?'),
886 'where' => 'civicrm_event.is_map',
888 'table_name' => 'civicrm_event',
890 'bao' => 'CRM_Event_BAO_Event',
893 'type' => 'CheckBox',
898 'name' => 'is_active',
899 'type' => CRM_Utils_Type
::T_BOOLEAN
,
900 'title' => ts('Is Active'),
901 'description' => ts('Is this Event enabled or disabled/cancelled?'),
902 'where' => 'civicrm_event.is_active',
904 'table_name' => 'civicrm_event',
906 'bao' => 'CRM_Event_BAO_Event',
909 'type' => 'CheckBox',
914 'name' => 'fee_label',
915 'type' => CRM_Utils_Type
::T_STRING
,
916 'title' => ts('Fee Label'),
918 'size' => CRM_Utils_Type
::HUGE
,
920 'where' => 'civicrm_event.fee_label',
921 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
923 'table_name' => 'civicrm_event',
925 'bao' => 'CRM_Event_BAO_Event',
932 'is_show_location' => [
933 'name' => 'is_show_location',
934 'type' => CRM_Utils_Type
::T_BOOLEAN
,
935 'title' => ts('show location'),
936 'description' => ts('If true, show event location.'),
937 'where' => 'civicrm_event.is_show_location',
939 'table_name' => 'civicrm_event',
941 'bao' => 'CRM_Event_BAO_Event',
944 'type' => 'CheckBox',
949 'name' => 'loc_block_id',
950 'type' => CRM_Utils_Type
::T_INT
,
951 'title' => ts('Location Block ID'),
952 'description' => ts('FK to Location Block ID'),
953 'where' => 'civicrm_event.loc_block_id',
954 'table_name' => 'civicrm_event',
956 'bao' => 'CRM_Event_BAO_Event',
958 'FKClassName' => 'CRM_Core_DAO_LocBlock',
961 'default_role_id' => [
962 'name' => 'default_role_id',
963 'type' => CRM_Utils_Type
::T_INT
,
964 'title' => ts('Default Role'),
965 'description' => ts('Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.'),
967 'where' => 'civicrm_event.default_role_id',
970 'table_name' => 'civicrm_event',
972 'bao' => 'CRM_Event_BAO_Event',
977 'pseudoconstant' => [
978 'optionGroupName' => 'participant_role',
979 'optionEditPath' => 'civicrm/admin/options/participant_role',
984 'name' => 'intro_text',
985 'type' => CRM_Utils_Type
::T_TEXT
,
986 'title' => ts('Introductory Message'),
987 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
990 'where' => 'civicrm_event.intro_text',
991 'table_name' => 'civicrm_event',
993 'bao' => 'CRM_Event_BAO_Event',
996 'type' => 'RichTextEditor',
1001 'name' => 'footer_text',
1002 'type' => CRM_Utils_Type
::T_TEXT
,
1003 'title' => ts('Footer Message'),
1004 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
1007 'where' => 'civicrm_event.footer_text',
1008 'table_name' => 'civicrm_event',
1009 'entity' => 'Event',
1010 'bao' => 'CRM_Event_BAO_Event',
1013 'type' => 'RichTextEditor',
1017 'confirm_title' => [
1018 'name' => 'confirm_title',
1019 'type' => CRM_Utils_Type
::T_STRING
,
1020 'title' => ts('Confirmation Title'),
1021 'description' => ts('Title for Confirmation page.'),
1023 'size' => CRM_Utils_Type
::HUGE
,
1024 'where' => 'civicrm_event.confirm_title',
1025 'default' => 'NULL',
1026 'table_name' => 'civicrm_event',
1027 'entity' => 'Event',
1028 'bao' => 'CRM_Event_BAO_Event',
1036 'name' => 'confirm_text',
1037 'type' => CRM_Utils_Type
::T_TEXT
,
1038 'title' => ts('Confirm Text'),
1039 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
1042 'where' => 'civicrm_event.confirm_text',
1043 'table_name' => 'civicrm_event',
1044 'entity' => 'Event',
1045 'bao' => 'CRM_Event_BAO_Event',
1048 'type' => 'RichTextEditor',
1052 'confirm_footer_text' => [
1053 'name' => 'confirm_footer_text',
1054 'type' => CRM_Utils_Type
::T_TEXT
,
1055 'title' => ts('Footer Text'),
1056 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
1059 'where' => 'civicrm_event.confirm_footer_text',
1060 'table_name' => 'civicrm_event',
1061 'entity' => 'Event',
1062 'bao' => 'CRM_Event_BAO_Event',
1065 'type' => 'RichTextEditor',
1069 'is_email_confirm' => [
1070 'name' => 'is_email_confirm',
1071 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1072 'title' => ts('Is confirm email'),
1073 'description' => ts('If true, confirmation is automatically emailed to contact on successful registration.'),
1074 'where' => 'civicrm_event.is_email_confirm',
1076 'table_name' => 'civicrm_event',
1077 'entity' => 'Event',
1078 'bao' => 'CRM_Event_BAO_Event',
1081 'type' => 'CheckBox',
1085 'confirm_email_text' => [
1086 'name' => 'confirm_email_text',
1087 'type' => CRM_Utils_Type
::T_TEXT
,
1088 'title' => ts('Confirmation Email Text'),
1089 'description' => ts('text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now'),
1092 'where' => 'civicrm_event.confirm_email_text',
1093 'table_name' => 'civicrm_event',
1094 'entity' => 'Event',
1095 'bao' => 'CRM_Event_BAO_Event',
1098 'type' => 'TextArea',
1102 'confirm_from_name' => [
1103 'name' => 'confirm_from_name',
1104 'type' => CRM_Utils_Type
::T_STRING
,
1105 'title' => ts('Confirm From Name'),
1106 'description' => ts('FROM email name used for confirmation emails.'),
1108 'size' => CRM_Utils_Type
::HUGE
,
1109 'where' => 'civicrm_event.confirm_from_name',
1110 'table_name' => 'civicrm_event',
1111 'entity' => 'Event',
1112 'bao' => 'CRM_Event_BAO_Event',
1119 'confirm_from_email' => [
1120 'name' => 'confirm_from_email',
1121 'type' => CRM_Utils_Type
::T_STRING
,
1122 'title' => ts('Confirm From Email'),
1123 'description' => ts('FROM email address used for confirmation emails.'),
1125 'size' => CRM_Utils_Type
::HUGE
,
1126 'where' => 'civicrm_event.confirm_from_email',
1127 'table_name' => 'civicrm_event',
1128 'entity' => 'Event',
1129 'bao' => 'CRM_Event_BAO_Event',
1137 'name' => 'cc_confirm',
1138 'type' => CRM_Utils_Type
::T_STRING
,
1139 'title' => ts('Cc Confirm'),
1140 'description' => ts('comma-separated list of email addresses to cc each time a confirmation is sent'),
1142 'size' => CRM_Utils_Type
::HUGE
,
1143 'where' => 'civicrm_event.cc_confirm',
1144 'table_name' => 'civicrm_event',
1145 'entity' => 'Event',
1146 'bao' => 'CRM_Event_BAO_Event',
1154 'name' => 'bcc_confirm',
1155 'type' => CRM_Utils_Type
::T_STRING
,
1156 'title' => ts('Bcc Confirm'),
1157 'description' => ts('comma-separated list of email addresses to bcc each time a confirmation is sent'),
1159 'size' => CRM_Utils_Type
::HUGE
,
1160 'where' => 'civicrm_event.bcc_confirm',
1161 'table_name' => 'civicrm_event',
1162 'entity' => 'Event',
1163 'bao' => 'CRM_Event_BAO_Event',
1170 'default_fee_id' => [
1171 'name' => 'default_fee_id',
1172 'type' => CRM_Utils_Type
::T_INT
,
1173 'title' => ts('Default Fee ID'),
1174 'description' => ts('FK to civicrm_option_value.'),
1175 'where' => 'civicrm_event.default_fee_id',
1176 'table_name' => 'civicrm_event',
1177 'entity' => 'Event',
1178 'bao' => 'CRM_Event_BAO_Event',
1182 'default_discount_fee_id' => [
1183 'name' => 'default_discount_fee_id',
1184 'type' => CRM_Utils_Type
::T_INT
,
1185 'title' => ts('Default Discount Fee ID'),
1186 'description' => ts('FK to civicrm_option_value.'),
1187 'where' => 'civicrm_event.default_discount_fee_id',
1188 'table_name' => 'civicrm_event',
1189 'entity' => 'Event',
1190 'bao' => 'CRM_Event_BAO_Event',
1194 'thankyou_title' => [
1195 'name' => 'thankyou_title',
1196 'type' => CRM_Utils_Type
::T_STRING
,
1197 'title' => ts('ThankYou Title'),
1198 'description' => ts('Title for ThankYou page.'),
1200 'size' => CRM_Utils_Type
::HUGE
,
1201 'where' => 'civicrm_event.thankyou_title',
1202 'default' => 'NULL',
1203 'table_name' => 'civicrm_event',
1204 'entity' => 'Event',
1205 'bao' => 'CRM_Event_BAO_Event',
1212 'thankyou_text' => [
1213 'name' => 'thankyou_text',
1214 'type' => CRM_Utils_Type
::T_TEXT
,
1215 'title' => ts('ThankYou Text'),
1216 'description' => ts('ThankYou Text.'),
1219 'where' => 'civicrm_event.thankyou_text',
1220 'table_name' => 'civicrm_event',
1221 'entity' => 'Event',
1222 'bao' => 'CRM_Event_BAO_Event',
1225 'type' => 'RichTextEditor',
1229 'thankyou_footer_text' => [
1230 'name' => 'thankyou_footer_text',
1231 'type' => CRM_Utils_Type
::T_TEXT
,
1232 'title' => ts('Footer Text'),
1233 'description' => ts('Footer message.'),
1236 'where' => 'civicrm_event.thankyou_footer_text',
1237 'table_name' => 'civicrm_event',
1238 'entity' => 'Event',
1239 'bao' => 'CRM_Event_BAO_Event',
1242 'type' => 'RichTextEditor',
1247 'name' => 'is_pay_later',
1248 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1249 'title' => ts('Pay Later Allowed'),
1250 'description' => ts('if true - allows the user to send payment directly to the org later'),
1251 'where' => 'civicrm_event.is_pay_later',
1253 'table_name' => 'civicrm_event',
1254 'entity' => 'Event',
1255 'bao' => 'CRM_Event_BAO_Event',
1258 'type' => 'CheckBox',
1262 'pay_later_text' => [
1263 'name' => 'pay_later_text',
1264 'type' => CRM_Utils_Type
::T_TEXT
,
1265 'title' => ts('Pay Later Text'),
1266 'description' => ts('The text displayed to the user in the main form'),
1267 'where' => 'civicrm_event.pay_later_text',
1268 'table_name' => 'civicrm_event',
1269 'entity' => 'Event',
1270 'bao' => 'CRM_Event_BAO_Event',
1273 'type' => 'RichTextEditor',
1277 'pay_later_receipt' => [
1278 'name' => 'pay_later_receipt',
1279 'type' => CRM_Utils_Type
::T_TEXT
,
1280 'title' => ts('Pay Later Receipt Text'),
1281 'description' => ts('The receipt sent to the user instead of the normal receipt text'),
1282 'where' => 'civicrm_event.pay_later_receipt',
1283 'table_name' => 'civicrm_event',
1284 'entity' => 'Event',
1285 'bao' => 'CRM_Event_BAO_Event',
1292 'is_partial_payment' => [
1293 'name' => 'is_partial_payment',
1294 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1295 'title' => ts('Partial Payments Enabled'),
1296 'description' => ts('is partial payment enabled for this event'),
1297 'where' => 'civicrm_event.is_partial_payment',
1299 'table_name' => 'civicrm_event',
1300 'entity' => 'Event',
1301 'bao' => 'CRM_Event_BAO_Event',
1304 'type' => 'CheckBox',
1308 'initial_amount_label' => [
1309 'name' => 'initial_amount_label',
1310 'type' => CRM_Utils_Type
::T_STRING
,
1311 'title' => ts('Initial Amount Label'),
1312 'description' => ts('Initial amount label for partial payment'),
1314 'size' => CRM_Utils_Type
::HUGE
,
1315 'where' => 'civicrm_event.initial_amount_label',
1316 'table_name' => 'civicrm_event',
1317 'entity' => 'Event',
1318 'bao' => 'CRM_Event_BAO_Event',
1325 'initial_amount_help_text' => [
1326 'name' => 'initial_amount_help_text',
1327 'type' => CRM_Utils_Type
::T_TEXT
,
1328 'title' => ts('Initial Amount Help Text'),
1329 'description' => ts('Initial amount help text for partial payment'),
1330 'where' => 'civicrm_event.initial_amount_help_text',
1331 'table_name' => 'civicrm_event',
1332 'entity' => 'Event',
1333 'bao' => 'CRM_Event_BAO_Event',
1340 'min_initial_amount' => [
1341 'name' => 'min_initial_amount',
1342 'type' => CRM_Utils_Type
::T_MONEY
,
1343 'title' => ts('Minimum Initial Amount'),
1344 'description' => ts('Minimum initial amount for partial payment'),
1349 'where' => 'civicrm_event.min_initial_amount',
1350 'table_name' => 'civicrm_event',
1351 'entity' => 'Event',
1352 'bao' => 'CRM_Event_BAO_Event',
1359 'is_multiple_registrations' => [
1360 'name' => 'is_multiple_registrations',
1361 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1362 'title' => ts('Allow Multiple Registrations'),
1363 'description' => ts('if true - allows the user to register multiple participants for event'),
1364 'where' => 'civicrm_event.is_multiple_registrations',
1366 'table_name' => 'civicrm_event',
1367 'entity' => 'Event',
1368 'bao' => 'CRM_Event_BAO_Event',
1371 'type' => 'CheckBox',
1375 'max_additional_participants' => [
1376 'name' => 'max_additional_participants',
1377 'type' => CRM_Utils_Type
::T_INT
,
1378 'title' => ts('Maximum number of additional participants per registration'),
1379 'description' => ts('Maximum number of additional participants that can be registered on a single booking'),
1380 'where' => 'civicrm_event.max_additional_participants',
1382 'table_name' => 'civicrm_event',
1383 'entity' => 'Event',
1384 'bao' => 'CRM_Event_BAO_Event',
1388 'allow_same_participant_emails' => [
1389 'name' => 'allow_same_participant_emails',
1390 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1391 'title' => ts('Does Event allow multiple registrations from same email address?'),
1392 'description' => ts('if true - allows the user to register multiple registrations from same email address.'),
1393 'where' => 'civicrm_event.allow_same_participant_emails',
1395 'table_name' => 'civicrm_event',
1396 'entity' => 'Event',
1397 'bao' => 'CRM_Event_BAO_Event',
1400 'type' => 'CheckBox',
1405 'name' => 'has_waitlist',
1406 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1407 'title' => ts('Waitlist Enabled'),
1408 'description' => ts('Whether the event has waitlist support.'),
1409 'where' => 'civicrm_event.has_waitlist',
1410 'table_name' => 'civicrm_event',
1411 'entity' => 'Event',
1412 'bao' => 'CRM_Event_BAO_Event',
1415 'type' => 'CheckBox',
1419 'requires_approval' => [
1420 'name' => 'requires_approval',
1421 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1422 'title' => ts('Requires Approval'),
1423 'description' => ts('Whether participants require approval before they can finish registering.'),
1424 'where' => 'civicrm_event.requires_approval',
1425 'table_name' => 'civicrm_event',
1426 'entity' => 'Event',
1427 'bao' => 'CRM_Event_BAO_Event',
1430 'type' => 'CheckBox',
1434 'expiration_time' => [
1435 'name' => 'expiration_time',
1436 'type' => CRM_Utils_Type
::T_INT
,
1437 'title' => ts('Expiration Time'),
1438 'description' => ts('Expire pending but unconfirmed registrations after this many hours.'),
1439 'where' => 'civicrm_event.expiration_time',
1440 'table_name' => 'civicrm_event',
1441 'entity' => 'Event',
1442 'bao' => 'CRM_Event_BAO_Event',
1449 'allow_selfcancelxfer' => [
1450 'name' => 'allow_selfcancelxfer',
1451 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1452 'title' => ts('Allow Self-service Cancellation or Transfer'),
1453 'description' => ts('Allow self service cancellation or transfer for event?'),
1454 'where' => 'civicrm_event.allow_selfcancelxfer',
1456 'table_name' => 'civicrm_event',
1457 'entity' => 'Event',
1458 'bao' => 'CRM_Event_BAO_Event',
1461 'type' => 'CheckBox',
1465 'selfcancelxfer_time' => [
1466 'name' => 'selfcancelxfer_time',
1467 'type' => CRM_Utils_Type
::T_INT
,
1468 'title' => ts('Self-service Cancellation or Transfer Time'),
1469 'description' => ts('Number of hours prior to event start date to allow self-service cancellation or transfer.'),
1470 'where' => 'civicrm_event.selfcancelxfer_time',
1472 'table_name' => 'civicrm_event',
1473 'entity' => 'Event',
1474 'bao' => 'CRM_Event_BAO_Event',
1481 'waitlist_text' => [
1482 'name' => 'waitlist_text',
1483 'type' => CRM_Utils_Type
::T_TEXT
,
1484 'title' => ts('Waitlist Text'),
1485 'description' => ts('Text to display when the event is full, but participants can signup for a waitlist.'),
1488 'where' => 'civicrm_event.waitlist_text',
1489 'table_name' => 'civicrm_event',
1490 'entity' => 'Event',
1491 'bao' => 'CRM_Event_BAO_Event',
1494 'type' => 'TextArea',
1498 'approval_req_text' => [
1499 'name' => 'approval_req_text',
1500 'type' => CRM_Utils_Type
::T_TEXT
,
1501 'title' => ts('Approval Req Text'),
1502 'description' => ts('Text to display when the approval is required to complete registration for an event.'),
1505 'where' => 'civicrm_event.approval_req_text',
1506 'table_name' => 'civicrm_event',
1507 'entity' => 'Event',
1508 'bao' => 'CRM_Event_BAO_Event',
1511 'type' => 'TextArea',
1516 'name' => 'is_template',
1517 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1518 'title' => ts('Is an Event Template'),
1519 'description' => ts('whether the event has template'),
1521 'where' => 'civicrm_event.is_template',
1523 'table_name' => 'civicrm_event',
1524 'entity' => 'Event',
1525 'bao' => 'CRM_Event_BAO_Event',
1528 'type' => 'CheckBox',
1532 'template_title' => [
1533 'name' => 'template_title',
1534 'type' => CRM_Utils_Type
::T_STRING
,
1535 'title' => ts('Event Template Title'),
1536 'description' => ts('Event Template Title'),
1538 'size' => CRM_Utils_Type
::HUGE
,
1540 'where' => 'civicrm_event.template_title',
1541 'headerPattern' => '/(template.)?title$/i',
1543 'table_name' => 'civicrm_event',
1544 'entity' => 'Event',
1545 'bao' => 'CRM_Event_BAO_Event',
1553 'name' => 'created_id',
1554 'type' => CRM_Utils_Type
::T_INT
,
1555 'title' => ts('Created By Contact ID'),
1556 'description' => ts('FK to civicrm_contact, who created this event'),
1557 'where' => 'civicrm_event.created_id',
1558 'table_name' => 'civicrm_event',
1559 'entity' => 'Event',
1560 'bao' => 'CRM_Event_BAO_Event',
1562 'FKClassName' => 'CRM_Contact_DAO_Contact',
1566 'name' => 'created_date',
1567 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
1568 'title' => ts('Event Created Date'),
1569 'description' => ts('Date and time that event was created.'),
1570 'where' => 'civicrm_event.created_date',
1571 'table_name' => 'civicrm_event',
1572 'entity' => 'Event',
1573 'bao' => 'CRM_Event_BAO_Event',
1578 'name' => 'currency',
1579 'type' => CRM_Utils_Type
::T_STRING
,
1580 'title' => ts('Currency'),
1581 'description' => ts('3 character string, value from config setting or input via user.'),
1583 'size' => CRM_Utils_Type
::FOUR
,
1585 'where' => 'civicrm_event.currency',
1586 'headerPattern' => '/cur(rency)?/i',
1587 'dataPattern' => '/^[A-Z]{3}$/i',
1589 'table_name' => 'civicrm_event',
1590 'entity' => 'Event',
1591 'bao' => 'CRM_Event_BAO_Event',
1596 'pseudoconstant' => [
1597 'table' => 'civicrm_currency',
1598 'keyColumn' => 'name',
1599 'labelColumn' => 'full_name',
1600 'nameColumn' => 'name',
1601 'abbrColumn' => 'symbol',
1606 'name' => 'campaign_id',
1607 'type' => CRM_Utils_Type
::T_INT
,
1608 'title' => ts('Campaign'),
1609 'description' => ts('The campaign for which this event has been created.'),
1610 'where' => 'civicrm_event.campaign_id',
1611 'table_name' => 'civicrm_event',
1612 'entity' => 'Event',
1613 'bao' => 'CRM_Event_BAO_Event',
1615 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1617 'type' => 'EntityRef',
1619 'pseudoconstant' => [
1620 'table' => 'civicrm_campaign',
1621 'keyColumn' => 'id',
1622 'labelColumn' => 'title',
1627 'name' => 'is_share',
1628 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1629 'title' => ts('Is shared through social media'),
1630 'description' => ts('Can people share the event through social media?'),
1631 'where' => 'civicrm_event.is_share',
1633 'table_name' => 'civicrm_event',
1634 'entity' => 'Event',
1635 'bao' => 'CRM_Event_BAO_Event',
1638 'type' => 'CheckBox',
1642 'is_confirm_enabled' => [
1643 'name' => 'is_confirm_enabled',
1644 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1645 'title' => ts('Is the booking confirmation screen enabled?'),
1646 'description' => ts('If false, the event booking confirmation screen gets skipped'),
1647 'where' => 'civicrm_event.is_confirm_enabled',
1649 'table_name' => 'civicrm_event',
1650 'entity' => 'Event',
1651 'bao' => 'CRM_Event_BAO_Event',
1654 'type' => 'CheckBox',
1658 'parent_event_id' => [
1659 'name' => 'parent_event_id',
1660 'type' => CRM_Utils_Type
::T_INT
,
1661 'title' => ts('Parent Event ID'),
1662 'description' => ts('Implicit FK to civicrm_event: parent event'),
1663 'where' => 'civicrm_event.parent_event_id',
1664 'default' => 'NULL',
1665 'table_name' => 'civicrm_event',
1666 'entity' => 'Event',
1667 'bao' => 'CRM_Event_BAO_Event',
1670 'type' => 'EntityRef',
1674 'slot_label_id' => [
1675 'name' => 'slot_label_id',
1676 'type' => CRM_Utils_Type
::T_INT
,
1677 'title' => ts('Subevent Slot Label ID'),
1678 'description' => ts('Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.'),
1679 'where' => 'civicrm_event.slot_label_id',
1680 'default' => 'NULL',
1681 'table_name' => 'civicrm_event',
1682 'entity' => 'Event',
1683 'bao' => 'CRM_Event_BAO_Event',
1690 'dedupe_rule_group_id' => [
1691 'name' => 'dedupe_rule_group_id',
1692 'type' => CRM_Utils_Type
::T_INT
,
1693 'title' => ts('Dedupe Rule'),
1694 'description' => ts('Rule to use when matching registrations for this event'),
1695 'where' => 'civicrm_event.dedupe_rule_group_id',
1696 'default' => 'NULL',
1697 'table_name' => 'civicrm_event',
1698 'entity' => 'Event',
1699 'bao' => 'CRM_Event_BAO_Event',
1701 'FKClassName' => 'CRM_Dedupe_DAO_RuleGroup',
1705 'pseudoconstant' => [
1706 'table' => 'civicrm_dedupe_rule_group',
1707 'keyColumn' => 'id',
1708 'labelColumn' => 'title',
1709 'nameColumn' => 'name',
1713 'is_billing_required' => [
1714 'name' => 'is_billing_required',
1715 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1716 'title' => ts('Is billing block required'),
1717 'description' => ts('if true than billing block is required this event'),
1718 'where' => 'civicrm_event.is_billing_required',
1720 'table_name' => 'civicrm_event',
1721 'entity' => 'Event',
1722 'bao' => 'CRM_Event_BAO_Event',
1725 'type' => 'CheckBox',
1730 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1732 return Civi
::$statics[__CLASS__
]['fields'];
1736 * Return a mapping from field-name to the corresponding key (as used in fields()).
1739 * Array(string $name => string $uniqueName).
1741 public static function &fieldKeys() {
1742 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1743 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1745 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1749 * Returns the names of this table
1753 public static function getTableName() {
1754 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1758 * Returns if this table needs to be logged
1762 public function getLog() {
1767 * Returns the list of fields that can be imported
1769 * @param bool $prefix
1773 public static function &import($prefix = FALSE) {
1774 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'event', $prefix, []);
1779 * Returns the list of fields that can be exported
1781 * @param bool $prefix
1785 public static function &export($prefix = FALSE) {
1786 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'event', $prefix, []);
1791 * Returns the list of indices
1793 * @param bool $localize
1797 public static function indices($localize = TRUE) {
1799 'index_event_type_id' => [
1800 'name' => 'index_event_type_id',
1802 0 => 'event_type_id',
1804 'localizable' => FALSE,
1805 'sig' => 'civicrm_event::0::event_type_id',
1807 'index_participant_listing_id' => [
1808 'name' => 'index_participant_listing_id',
1810 0 => 'participant_listing_id',
1812 'localizable' => FALSE,
1813 'sig' => 'civicrm_event::0::participant_listing_id',
1815 'index_parent_event_id' => [
1816 'name' => 'index_parent_event_id',
1818 0 => 'parent_event_id',
1820 'localizable' => FALSE,
1821 'sig' => 'civicrm_event::0::parent_event_id',
1824 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;