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:3514f838a27ddbf9bdf6e63ea20aabec)
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 * @param bool $plural
533 * Whether to return the plural version of the title.
535 public static function getEntityTitle($plural = FALSE) {
536 return $plural ?
ts('Events') : ts('Event');
540 * Returns foreign keys and entity references.
543 * [CRM_Core_Reference_Interface]
545 public static function getReferenceColumns() {
546 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
547 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
548 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'loc_block_id', 'civicrm_loc_block', 'id');
549 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'created_id', 'civicrm_contact', 'id');
550 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
551 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'dedupe_rule_group_id', 'civicrm_dedupe_rule_group', 'id');
552 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
554 return Civi
::$statics[__CLASS__
]['links'];
558 * Returns all the column names of this table
562 public static function &fields() {
563 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
564 Civi
::$statics[__CLASS__
]['fields'] = [
567 'type' => CRM_Utils_Type
::T_INT
,
568 'title' => ts('Event ID'),
569 'description' => ts('Event'),
571 'where' => 'civicrm_event.id',
572 'table_name' => 'civicrm_event',
574 'bao' => 'CRM_Event_BAO_Event',
580 'type' => CRM_Utils_Type
::T_STRING
,
581 'title' => ts('Event Title'),
582 'description' => ts('Event Title (e.g. Fall Fundraiser Dinner)'),
584 'size' => CRM_Utils_Type
::HUGE
,
586 'where' => 'civicrm_event.title',
587 'headerPattern' => '/(event.)?title$/i',
589 'table_name' => 'civicrm_event',
591 'bao' => 'CRM_Event_BAO_Event',
600 'type' => CRM_Utils_Type
::T_TEXT
,
601 'title' => ts('Event Summary'),
602 '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.'),
605 'where' => 'civicrm_event.summary',
606 'table_name' => 'civicrm_event',
608 'bao' => 'CRM_Event_BAO_Event',
611 'type' => 'TextArea',
615 'event_description' => [
616 'name' => 'description',
617 'type' => CRM_Utils_Type
::T_TEXT
,
618 'title' => ts('Event Description'),
619 'description' => ts('Full description of event. Text and html allowed. Displayed on built-in Event Information screens.'),
622 'where' => 'civicrm_event.description',
623 'table_name' => 'civicrm_event',
625 'bao' => 'CRM_Event_BAO_Event',
628 'type' => 'RichTextEditor',
633 'name' => 'event_type_id',
634 'type' => CRM_Utils_Type
::T_INT
,
635 'title' => ts('Event Type'),
636 'description' => ts('Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.'),
637 'where' => 'civicrm_event.event_type_id',
639 'table_name' => 'civicrm_event',
641 'bao' => 'CRM_Event_BAO_Event',
646 'pseudoconstant' => [
647 'optionGroupName' => 'event_type',
648 'optionEditPath' => 'civicrm/admin/options/event_type',
652 'participant_listing_id' => [
653 'name' => 'participant_listing_id',
654 'type' => CRM_Utils_Type
::T_INT
,
655 'title' => ts('Participant Listing'),
656 'description' => ts('Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.'),
657 'where' => 'civicrm_event.participant_listing_id',
659 'table_name' => 'civicrm_event',
661 'bao' => 'CRM_Event_BAO_Event',
666 'pseudoconstant' => [
667 'optionGroupName' => 'participant_listing',
668 'optionEditPath' => 'civicrm/admin/options/participant_listing',
673 'name' => 'is_public',
674 'type' => CRM_Utils_Type
::T_BOOLEAN
,
675 'title' => ts('Is Event Public'),
676 'description' => ts('Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.'),
677 'where' => 'civicrm_event.is_public',
679 'table_name' => 'civicrm_event',
681 'bao' => 'CRM_Event_BAO_Event',
684 'type' => 'CheckBox',
688 'event_start_date' => [
689 'name' => 'start_date',
690 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
691 'title' => ts('Event Start Date'),
692 'description' => ts('Date and time that event starts.'),
694 'where' => 'civicrm_event.start_date',
695 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
697 'table_name' => 'civicrm_event',
699 'bao' => 'CRM_Event_BAO_Event',
702 'type' => 'Select Date',
703 'formatType' => 'activityDateTime',
707 'event_end_date' => [
708 'name' => 'end_date',
709 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
710 'title' => ts('Event End Date'),
711 'description' => ts('Date and time that event ends. May be NULL if no defined end date/time'),
713 'where' => 'civicrm_event.end_date',
714 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
716 'table_name' => 'civicrm_event',
718 'bao' => 'CRM_Event_BAO_Event',
721 'type' => 'Select Date',
722 'formatType' => 'activityDateTime',
726 'is_online_registration' => [
727 'name' => 'is_online_registration',
728 'type' => CRM_Utils_Type
::T_BOOLEAN
,
729 'title' => ts('Is Online Registration'),
730 'description' => ts('If true, include registration link on Event Info page.'),
731 'where' => 'civicrm_event.is_online_registration',
733 'table_name' => 'civicrm_event',
735 'bao' => 'CRM_Event_BAO_Event',
738 'type' => 'CheckBox',
742 'registration_link_text' => [
743 'name' => 'registration_link_text',
744 'type' => CRM_Utils_Type
::T_STRING
,
745 'title' => ts('Event Registration Link Text'),
746 'description' => ts('Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.'),
748 'size' => CRM_Utils_Type
::HUGE
,
749 'where' => 'civicrm_event.registration_link_text',
750 'table_name' => 'civicrm_event',
752 'bao' => 'CRM_Event_BAO_Event',
759 'registration_start_date' => [
760 'name' => 'registration_start_date',
761 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
762 'title' => ts('Registration Start Date'),
763 'description' => ts('Date and time that online registration starts.'),
764 'where' => 'civicrm_event.registration_start_date',
765 'table_name' => 'civicrm_event',
767 'bao' => 'CRM_Event_BAO_Event',
770 'type' => 'Select Date',
771 'formatType' => 'activityDateTime',
775 'registration_end_date' => [
776 'name' => 'registration_end_date',
777 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
778 'title' => ts('Registration End Date'),
779 'description' => ts('Date and time that online registration ends.'),
780 'where' => 'civicrm_event.registration_end_date',
781 'table_name' => 'civicrm_event',
783 'bao' => 'CRM_Event_BAO_Event',
786 'type' => 'Select Date',
787 'formatType' => 'activityDateTime',
791 'max_participants' => [
792 'name' => 'max_participants',
793 'type' => CRM_Utils_Type
::T_INT
,
794 'title' => ts('Max Participants'),
795 '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.'),
796 'where' => 'civicrm_event.max_participants',
798 'table_name' => 'civicrm_event',
800 'bao' => 'CRM_Event_BAO_Event',
807 'event_full_text' => [
808 'name' => 'event_full_text',
809 'type' => CRM_Utils_Type
::T_TEXT
,
810 'title' => ts('Event Information'),
811 '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.'),
814 'where' => 'civicrm_event.event_full_text',
815 'table_name' => 'civicrm_event',
817 'bao' => 'CRM_Event_BAO_Event',
820 'type' => 'TextArea',
825 'name' => 'is_monetary',
826 'type' => CRM_Utils_Type
::T_BOOLEAN
,
827 'title' => ts('Is this a PAID event?'),
828 'description' => ts('If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.'),
829 'where' => 'civicrm_event.is_monetary',
831 'table_name' => 'civicrm_event',
833 'bao' => 'CRM_Event_BAO_Event',
836 'type' => 'CheckBox',
840 'financial_type_id' => [
841 'name' => 'financial_type_id',
842 'type' => CRM_Utils_Type
::T_INT
,
843 'title' => ts('Financial Type'),
844 'description' => ts('Financial type assigned to paid event registrations for this event. Required if is_monetary is true.'),
845 'where' => 'civicrm_event.financial_type_id',
847 'table_name' => 'civicrm_event',
849 'bao' => 'CRM_Event_BAO_Event',
854 'pseudoconstant' => [
855 'table' => 'civicrm_financial_type',
857 'labelColumn' => 'name',
861 'payment_processor' => [
862 'name' => 'payment_processor',
863 'type' => CRM_Utils_Type
::T_STRING
,
864 'title' => ts('Payment Processor'),
865 'description' => ts('Payment Processors configured for this Event (if is_monetary is true)'),
867 'size' => CRM_Utils_Type
::HUGE
,
868 'where' => 'civicrm_event.payment_processor',
869 'table_name' => 'civicrm_event',
871 'bao' => 'CRM_Event_BAO_Event',
873 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
877 'pseudoconstant' => [
878 'table' => 'civicrm_payment_processor',
880 'labelColumn' => 'name',
886 'type' => CRM_Utils_Type
::T_BOOLEAN
,
887 'title' => ts('Map Enabled'),
888 'description' => ts('Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?'),
889 'where' => 'civicrm_event.is_map',
891 'table_name' => 'civicrm_event',
893 'bao' => 'CRM_Event_BAO_Event',
896 'type' => 'CheckBox',
901 'name' => 'is_active',
902 'type' => CRM_Utils_Type
::T_BOOLEAN
,
903 'title' => ts('Is Active'),
904 'description' => ts('Is this Event enabled or disabled/cancelled?'),
905 'where' => 'civicrm_event.is_active',
907 'table_name' => 'civicrm_event',
909 'bao' => 'CRM_Event_BAO_Event',
912 'type' => 'CheckBox',
917 'name' => 'fee_label',
918 'type' => CRM_Utils_Type
::T_STRING
,
919 'title' => ts('Fee Label'),
921 'size' => CRM_Utils_Type
::HUGE
,
923 'where' => 'civicrm_event.fee_label',
924 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
926 'table_name' => 'civicrm_event',
928 'bao' => 'CRM_Event_BAO_Event',
935 'is_show_location' => [
936 'name' => 'is_show_location',
937 'type' => CRM_Utils_Type
::T_BOOLEAN
,
938 'title' => ts('show location'),
939 'description' => ts('If true, show event location.'),
940 'where' => 'civicrm_event.is_show_location',
942 'table_name' => 'civicrm_event',
944 'bao' => 'CRM_Event_BAO_Event',
947 'type' => 'CheckBox',
952 'name' => 'loc_block_id',
953 'type' => CRM_Utils_Type
::T_INT
,
954 'title' => ts('Location Block ID'),
955 'description' => ts('FK to Location Block ID'),
956 'where' => 'civicrm_event.loc_block_id',
957 'table_name' => 'civicrm_event',
959 'bao' => 'CRM_Event_BAO_Event',
961 'FKClassName' => 'CRM_Core_DAO_LocBlock',
964 'default_role_id' => [
965 'name' => 'default_role_id',
966 'type' => CRM_Utils_Type
::T_INT
,
967 'title' => ts('Default Role'),
968 'description' => ts('Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.'),
970 'where' => 'civicrm_event.default_role_id',
973 'table_name' => 'civicrm_event',
975 'bao' => 'CRM_Event_BAO_Event',
980 'pseudoconstant' => [
981 'optionGroupName' => 'participant_role',
982 'optionEditPath' => 'civicrm/admin/options/participant_role',
987 'name' => 'intro_text',
988 'type' => CRM_Utils_Type
::T_TEXT
,
989 'title' => ts('Introductory Message'),
990 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
993 'where' => 'civicrm_event.intro_text',
994 'table_name' => 'civicrm_event',
996 'bao' => 'CRM_Event_BAO_Event',
999 'type' => 'RichTextEditor',
1004 'name' => 'footer_text',
1005 'type' => CRM_Utils_Type
::T_TEXT
,
1006 'title' => ts('Footer Message'),
1007 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
1010 'where' => 'civicrm_event.footer_text',
1011 'table_name' => 'civicrm_event',
1012 'entity' => 'Event',
1013 'bao' => 'CRM_Event_BAO_Event',
1016 'type' => 'RichTextEditor',
1020 'confirm_title' => [
1021 'name' => 'confirm_title',
1022 'type' => CRM_Utils_Type
::T_STRING
,
1023 'title' => ts('Confirmation Title'),
1024 'description' => ts('Title for Confirmation page.'),
1026 'size' => CRM_Utils_Type
::HUGE
,
1027 'where' => 'civicrm_event.confirm_title',
1028 'default' => 'NULL',
1029 'table_name' => 'civicrm_event',
1030 'entity' => 'Event',
1031 'bao' => 'CRM_Event_BAO_Event',
1039 'name' => 'confirm_text',
1040 'type' => CRM_Utils_Type
::T_TEXT
,
1041 'title' => ts('Confirm Text'),
1042 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
1045 'where' => 'civicrm_event.confirm_text',
1046 'table_name' => 'civicrm_event',
1047 'entity' => 'Event',
1048 'bao' => 'CRM_Event_BAO_Event',
1051 'type' => 'RichTextEditor',
1055 'confirm_footer_text' => [
1056 'name' => 'confirm_footer_text',
1057 'type' => CRM_Utils_Type
::T_TEXT
,
1058 'title' => ts('Footer Text'),
1059 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
1062 'where' => 'civicrm_event.confirm_footer_text',
1063 'table_name' => 'civicrm_event',
1064 'entity' => 'Event',
1065 'bao' => 'CRM_Event_BAO_Event',
1068 'type' => 'RichTextEditor',
1072 'is_email_confirm' => [
1073 'name' => 'is_email_confirm',
1074 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1075 'title' => ts('Is confirm email'),
1076 'description' => ts('If true, confirmation is automatically emailed to contact on successful registration.'),
1077 'where' => 'civicrm_event.is_email_confirm',
1079 'table_name' => 'civicrm_event',
1080 'entity' => 'Event',
1081 'bao' => 'CRM_Event_BAO_Event',
1084 'type' => 'CheckBox',
1088 'confirm_email_text' => [
1089 'name' => 'confirm_email_text',
1090 'type' => CRM_Utils_Type
::T_TEXT
,
1091 'title' => ts('Confirmation Email Text'),
1092 'description' => ts('text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now'),
1095 'where' => 'civicrm_event.confirm_email_text',
1096 'table_name' => 'civicrm_event',
1097 'entity' => 'Event',
1098 'bao' => 'CRM_Event_BAO_Event',
1101 'type' => 'TextArea',
1105 'confirm_from_name' => [
1106 'name' => 'confirm_from_name',
1107 'type' => CRM_Utils_Type
::T_STRING
,
1108 'title' => ts('Confirm From Name'),
1109 'description' => ts('FROM email name used for confirmation emails.'),
1111 'size' => CRM_Utils_Type
::HUGE
,
1112 'where' => 'civicrm_event.confirm_from_name',
1113 'table_name' => 'civicrm_event',
1114 'entity' => 'Event',
1115 'bao' => 'CRM_Event_BAO_Event',
1122 'confirm_from_email' => [
1123 'name' => 'confirm_from_email',
1124 'type' => CRM_Utils_Type
::T_STRING
,
1125 'title' => ts('Confirm From Email'),
1126 'description' => ts('FROM email address used for confirmation emails.'),
1128 'size' => CRM_Utils_Type
::HUGE
,
1129 'where' => 'civicrm_event.confirm_from_email',
1130 'table_name' => 'civicrm_event',
1131 'entity' => 'Event',
1132 'bao' => 'CRM_Event_BAO_Event',
1140 'name' => 'cc_confirm',
1141 'type' => CRM_Utils_Type
::T_STRING
,
1142 'title' => ts('Cc Confirm'),
1143 'description' => ts('comma-separated list of email addresses to cc each time a confirmation is sent'),
1145 'size' => CRM_Utils_Type
::HUGE
,
1146 'where' => 'civicrm_event.cc_confirm',
1147 'table_name' => 'civicrm_event',
1148 'entity' => 'Event',
1149 'bao' => 'CRM_Event_BAO_Event',
1157 'name' => 'bcc_confirm',
1158 'type' => CRM_Utils_Type
::T_STRING
,
1159 'title' => ts('Bcc Confirm'),
1160 'description' => ts('comma-separated list of email addresses to bcc each time a confirmation is sent'),
1162 'size' => CRM_Utils_Type
::HUGE
,
1163 'where' => 'civicrm_event.bcc_confirm',
1164 'table_name' => 'civicrm_event',
1165 'entity' => 'Event',
1166 'bao' => 'CRM_Event_BAO_Event',
1173 'default_fee_id' => [
1174 'name' => 'default_fee_id',
1175 'type' => CRM_Utils_Type
::T_INT
,
1176 'title' => ts('Default Fee ID'),
1177 'description' => ts('FK to civicrm_option_value.'),
1178 'where' => 'civicrm_event.default_fee_id',
1179 'table_name' => 'civicrm_event',
1180 'entity' => 'Event',
1181 'bao' => 'CRM_Event_BAO_Event',
1185 'default_discount_fee_id' => [
1186 'name' => 'default_discount_fee_id',
1187 'type' => CRM_Utils_Type
::T_INT
,
1188 'title' => ts('Default Discount Fee ID'),
1189 'description' => ts('FK to civicrm_option_value.'),
1190 'where' => 'civicrm_event.default_discount_fee_id',
1191 'table_name' => 'civicrm_event',
1192 'entity' => 'Event',
1193 'bao' => 'CRM_Event_BAO_Event',
1197 'thankyou_title' => [
1198 'name' => 'thankyou_title',
1199 'type' => CRM_Utils_Type
::T_STRING
,
1200 'title' => ts('ThankYou Title'),
1201 'description' => ts('Title for ThankYou page.'),
1203 'size' => CRM_Utils_Type
::HUGE
,
1204 'where' => 'civicrm_event.thankyou_title',
1205 'default' => 'NULL',
1206 'table_name' => 'civicrm_event',
1207 'entity' => 'Event',
1208 'bao' => 'CRM_Event_BAO_Event',
1215 'thankyou_text' => [
1216 'name' => 'thankyou_text',
1217 'type' => CRM_Utils_Type
::T_TEXT
,
1218 'title' => ts('ThankYou Text'),
1219 'description' => ts('ThankYou Text.'),
1222 'where' => 'civicrm_event.thankyou_text',
1223 'table_name' => 'civicrm_event',
1224 'entity' => 'Event',
1225 'bao' => 'CRM_Event_BAO_Event',
1228 'type' => 'RichTextEditor',
1232 'thankyou_footer_text' => [
1233 'name' => 'thankyou_footer_text',
1234 'type' => CRM_Utils_Type
::T_TEXT
,
1235 'title' => ts('Footer Text'),
1236 'description' => ts('Footer message.'),
1239 'where' => 'civicrm_event.thankyou_footer_text',
1240 'table_name' => 'civicrm_event',
1241 'entity' => 'Event',
1242 'bao' => 'CRM_Event_BAO_Event',
1245 'type' => 'RichTextEditor',
1250 'name' => 'is_pay_later',
1251 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1252 'title' => ts('Pay Later Allowed'),
1253 'description' => ts('if true - allows the user to send payment directly to the org later'),
1254 'where' => 'civicrm_event.is_pay_later',
1256 'table_name' => 'civicrm_event',
1257 'entity' => 'Event',
1258 'bao' => 'CRM_Event_BAO_Event',
1261 'type' => 'CheckBox',
1265 'pay_later_text' => [
1266 'name' => 'pay_later_text',
1267 'type' => CRM_Utils_Type
::T_TEXT
,
1268 'title' => ts('Pay Later Text'),
1269 'description' => ts('The text displayed to the user in the main form'),
1270 'where' => 'civicrm_event.pay_later_text',
1271 'table_name' => 'civicrm_event',
1272 'entity' => 'Event',
1273 'bao' => 'CRM_Event_BAO_Event',
1276 'type' => 'RichTextEditor',
1280 'pay_later_receipt' => [
1281 'name' => 'pay_later_receipt',
1282 'type' => CRM_Utils_Type
::T_TEXT
,
1283 'title' => ts('Pay Later Receipt Text'),
1284 'description' => ts('The receipt sent to the user instead of the normal receipt text'),
1285 'where' => 'civicrm_event.pay_later_receipt',
1286 'table_name' => 'civicrm_event',
1287 'entity' => 'Event',
1288 'bao' => 'CRM_Event_BAO_Event',
1295 'is_partial_payment' => [
1296 'name' => 'is_partial_payment',
1297 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1298 'title' => ts('Partial Payments Enabled'),
1299 'description' => ts('is partial payment enabled for this event'),
1300 'where' => 'civicrm_event.is_partial_payment',
1302 'table_name' => 'civicrm_event',
1303 'entity' => 'Event',
1304 'bao' => 'CRM_Event_BAO_Event',
1307 'type' => 'CheckBox',
1311 'initial_amount_label' => [
1312 'name' => 'initial_amount_label',
1313 'type' => CRM_Utils_Type
::T_STRING
,
1314 'title' => ts('Initial Amount Label'),
1315 'description' => ts('Initial amount label for partial payment'),
1317 'size' => CRM_Utils_Type
::HUGE
,
1318 'where' => 'civicrm_event.initial_amount_label',
1319 'table_name' => 'civicrm_event',
1320 'entity' => 'Event',
1321 'bao' => 'CRM_Event_BAO_Event',
1328 'initial_amount_help_text' => [
1329 'name' => 'initial_amount_help_text',
1330 'type' => CRM_Utils_Type
::T_TEXT
,
1331 'title' => ts('Initial Amount Help Text'),
1332 'description' => ts('Initial amount help text for partial payment'),
1333 'where' => 'civicrm_event.initial_amount_help_text',
1334 'table_name' => 'civicrm_event',
1335 'entity' => 'Event',
1336 'bao' => 'CRM_Event_BAO_Event',
1343 'min_initial_amount' => [
1344 'name' => 'min_initial_amount',
1345 'type' => CRM_Utils_Type
::T_MONEY
,
1346 'title' => ts('Minimum Initial Amount'),
1347 'description' => ts('Minimum initial amount for partial payment'),
1352 'where' => 'civicrm_event.min_initial_amount',
1353 'table_name' => 'civicrm_event',
1354 'entity' => 'Event',
1355 'bao' => 'CRM_Event_BAO_Event',
1362 'is_multiple_registrations' => [
1363 'name' => 'is_multiple_registrations',
1364 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1365 'title' => ts('Allow Multiple Registrations'),
1366 'description' => ts('if true - allows the user to register multiple participants for event'),
1367 'where' => 'civicrm_event.is_multiple_registrations',
1369 'table_name' => 'civicrm_event',
1370 'entity' => 'Event',
1371 'bao' => 'CRM_Event_BAO_Event',
1374 'type' => 'CheckBox',
1378 'max_additional_participants' => [
1379 'name' => 'max_additional_participants',
1380 'type' => CRM_Utils_Type
::T_INT
,
1381 'title' => ts('Maximum number of additional participants per registration'),
1382 'description' => ts('Maximum number of additional participants that can be registered on a single booking'),
1383 'where' => 'civicrm_event.max_additional_participants',
1385 'table_name' => 'civicrm_event',
1386 'entity' => 'Event',
1387 'bao' => 'CRM_Event_BAO_Event',
1391 'allow_same_participant_emails' => [
1392 'name' => 'allow_same_participant_emails',
1393 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1394 'title' => ts('Does Event allow multiple registrations from same email address?'),
1395 'description' => ts('if true - allows the user to register multiple registrations from same email address.'),
1396 'where' => 'civicrm_event.allow_same_participant_emails',
1398 'table_name' => 'civicrm_event',
1399 'entity' => 'Event',
1400 'bao' => 'CRM_Event_BAO_Event',
1403 'type' => 'CheckBox',
1408 'name' => 'has_waitlist',
1409 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1410 'title' => ts('Waitlist Enabled'),
1411 'description' => ts('Whether the event has waitlist support.'),
1412 'where' => 'civicrm_event.has_waitlist',
1413 'table_name' => 'civicrm_event',
1414 'entity' => 'Event',
1415 'bao' => 'CRM_Event_BAO_Event',
1418 'type' => 'CheckBox',
1422 'requires_approval' => [
1423 'name' => 'requires_approval',
1424 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1425 'title' => ts('Requires Approval'),
1426 'description' => ts('Whether participants require approval before they can finish registering.'),
1427 'where' => 'civicrm_event.requires_approval',
1428 'table_name' => 'civicrm_event',
1429 'entity' => 'Event',
1430 'bao' => 'CRM_Event_BAO_Event',
1433 'type' => 'CheckBox',
1437 'expiration_time' => [
1438 'name' => 'expiration_time',
1439 'type' => CRM_Utils_Type
::T_INT
,
1440 'title' => ts('Expiration Time'),
1441 'description' => ts('Expire pending but unconfirmed registrations after this many hours.'),
1442 'where' => 'civicrm_event.expiration_time',
1443 'table_name' => 'civicrm_event',
1444 'entity' => 'Event',
1445 'bao' => 'CRM_Event_BAO_Event',
1452 'allow_selfcancelxfer' => [
1453 'name' => 'allow_selfcancelxfer',
1454 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1455 'title' => ts('Allow Self-service Cancellation or Transfer'),
1456 'description' => ts('Allow self service cancellation or transfer for event?'),
1457 'where' => 'civicrm_event.allow_selfcancelxfer',
1459 'table_name' => 'civicrm_event',
1460 'entity' => 'Event',
1461 'bao' => 'CRM_Event_BAO_Event',
1464 'type' => 'CheckBox',
1468 'selfcancelxfer_time' => [
1469 'name' => 'selfcancelxfer_time',
1470 'type' => CRM_Utils_Type
::T_INT
,
1471 'title' => ts('Self-service Cancellation or Transfer Time'),
1472 'description' => ts('Number of hours prior to event start date to allow self-service cancellation or transfer.'),
1473 'where' => 'civicrm_event.selfcancelxfer_time',
1475 'table_name' => 'civicrm_event',
1476 'entity' => 'Event',
1477 'bao' => 'CRM_Event_BAO_Event',
1484 'waitlist_text' => [
1485 'name' => 'waitlist_text',
1486 'type' => CRM_Utils_Type
::T_TEXT
,
1487 'title' => ts('Waitlist Text'),
1488 'description' => ts('Text to display when the event is full, but participants can signup for a waitlist.'),
1491 'where' => 'civicrm_event.waitlist_text',
1492 'table_name' => 'civicrm_event',
1493 'entity' => 'Event',
1494 'bao' => 'CRM_Event_BAO_Event',
1497 'type' => 'TextArea',
1501 'approval_req_text' => [
1502 'name' => 'approval_req_text',
1503 'type' => CRM_Utils_Type
::T_TEXT
,
1504 'title' => ts('Approval Req Text'),
1505 'description' => ts('Text to display when the approval is required to complete registration for an event.'),
1508 'where' => 'civicrm_event.approval_req_text',
1509 'table_name' => 'civicrm_event',
1510 'entity' => 'Event',
1511 'bao' => 'CRM_Event_BAO_Event',
1514 'type' => 'TextArea',
1519 'name' => 'is_template',
1520 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1521 'title' => ts('Is an Event Template'),
1522 'description' => ts('whether the event has template'),
1524 'where' => 'civicrm_event.is_template',
1526 'table_name' => 'civicrm_event',
1527 'entity' => 'Event',
1528 'bao' => 'CRM_Event_BAO_Event',
1531 'type' => 'CheckBox',
1535 'template_title' => [
1536 'name' => 'template_title',
1537 'type' => CRM_Utils_Type
::T_STRING
,
1538 'title' => ts('Event Template Title'),
1539 'description' => ts('Event Template Title'),
1541 'size' => CRM_Utils_Type
::HUGE
,
1543 'where' => 'civicrm_event.template_title',
1544 'headerPattern' => '/(template.)?title$/i',
1546 'table_name' => 'civicrm_event',
1547 'entity' => 'Event',
1548 'bao' => 'CRM_Event_BAO_Event',
1556 'name' => 'created_id',
1557 'type' => CRM_Utils_Type
::T_INT
,
1558 'title' => ts('Created By Contact ID'),
1559 'description' => ts('FK to civicrm_contact, who created this event'),
1560 'where' => 'civicrm_event.created_id',
1561 'table_name' => 'civicrm_event',
1562 'entity' => 'Event',
1563 'bao' => 'CRM_Event_BAO_Event',
1565 'FKClassName' => 'CRM_Contact_DAO_Contact',
1569 'name' => 'created_date',
1570 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
1571 'title' => ts('Event Created Date'),
1572 'description' => ts('Date and time that event was created.'),
1573 'where' => 'civicrm_event.created_date',
1574 'table_name' => 'civicrm_event',
1575 'entity' => 'Event',
1576 'bao' => 'CRM_Event_BAO_Event',
1581 'name' => 'currency',
1582 'type' => CRM_Utils_Type
::T_STRING
,
1583 'title' => ts('Currency'),
1584 'description' => ts('3 character string, value from config setting or input via user.'),
1586 'size' => CRM_Utils_Type
::FOUR
,
1588 'where' => 'civicrm_event.currency',
1589 'headerPattern' => '/cur(rency)?/i',
1590 'dataPattern' => '/^[A-Z]{3}$/i',
1592 'table_name' => 'civicrm_event',
1593 'entity' => 'Event',
1594 'bao' => 'CRM_Event_BAO_Event',
1599 'pseudoconstant' => [
1600 'table' => 'civicrm_currency',
1601 'keyColumn' => 'name',
1602 'labelColumn' => 'full_name',
1603 'nameColumn' => 'name',
1604 'abbrColumn' => 'symbol',
1609 'name' => 'campaign_id',
1610 'type' => CRM_Utils_Type
::T_INT
,
1611 'title' => ts('Campaign'),
1612 'description' => ts('The campaign for which this event has been created.'),
1613 'where' => 'civicrm_event.campaign_id',
1614 'table_name' => 'civicrm_event',
1615 'entity' => 'Event',
1616 'bao' => 'CRM_Event_BAO_Event',
1618 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1620 'type' => 'EntityRef',
1622 'pseudoconstant' => [
1623 'table' => 'civicrm_campaign',
1624 'keyColumn' => 'id',
1625 'labelColumn' => 'title',
1630 'name' => 'is_share',
1631 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1632 'title' => ts('Is shared through social media'),
1633 'description' => ts('Can people share the event through social media?'),
1634 'where' => 'civicrm_event.is_share',
1636 'table_name' => 'civicrm_event',
1637 'entity' => 'Event',
1638 'bao' => 'CRM_Event_BAO_Event',
1641 'type' => 'CheckBox',
1645 'is_confirm_enabled' => [
1646 'name' => 'is_confirm_enabled',
1647 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1648 'title' => ts('Is the booking confirmation screen enabled?'),
1649 'description' => ts('If false, the event booking confirmation screen gets skipped'),
1650 'where' => 'civicrm_event.is_confirm_enabled',
1652 'table_name' => 'civicrm_event',
1653 'entity' => 'Event',
1654 'bao' => 'CRM_Event_BAO_Event',
1657 'type' => 'CheckBox',
1661 'parent_event_id' => [
1662 'name' => 'parent_event_id',
1663 'type' => CRM_Utils_Type
::T_INT
,
1664 'title' => ts('Parent Event ID'),
1665 'description' => ts('Implicit FK to civicrm_event: parent event'),
1666 'where' => 'civicrm_event.parent_event_id',
1667 'default' => 'NULL',
1668 'table_name' => 'civicrm_event',
1669 'entity' => 'Event',
1670 'bao' => 'CRM_Event_BAO_Event',
1673 'type' => 'EntityRef',
1677 'slot_label_id' => [
1678 'name' => 'slot_label_id',
1679 'type' => CRM_Utils_Type
::T_INT
,
1680 'title' => ts('Subevent Slot Label ID'),
1681 'description' => ts('Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.'),
1682 'where' => 'civicrm_event.slot_label_id',
1683 'default' => 'NULL',
1684 'table_name' => 'civicrm_event',
1685 'entity' => 'Event',
1686 'bao' => 'CRM_Event_BAO_Event',
1693 'dedupe_rule_group_id' => [
1694 'name' => 'dedupe_rule_group_id',
1695 'type' => CRM_Utils_Type
::T_INT
,
1696 'title' => ts('Dedupe Rule'),
1697 'description' => ts('Rule to use when matching registrations for this event'),
1698 'where' => 'civicrm_event.dedupe_rule_group_id',
1699 'default' => 'NULL',
1700 'table_name' => 'civicrm_event',
1701 'entity' => 'Event',
1702 'bao' => 'CRM_Event_BAO_Event',
1704 'FKClassName' => 'CRM_Dedupe_DAO_RuleGroup',
1708 'pseudoconstant' => [
1709 'table' => 'civicrm_dedupe_rule_group',
1710 'keyColumn' => 'id',
1711 'labelColumn' => 'title',
1712 'nameColumn' => 'name',
1716 'is_billing_required' => [
1717 'name' => 'is_billing_required',
1718 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1719 'title' => ts('Is billing block required'),
1720 'description' => ts('if true than billing block is required this event'),
1721 'where' => 'civicrm_event.is_billing_required',
1723 'table_name' => 'civicrm_event',
1724 'entity' => 'Event',
1725 'bao' => 'CRM_Event_BAO_Event',
1728 'type' => 'CheckBox',
1733 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1735 return Civi
::$statics[__CLASS__
]['fields'];
1739 * Return a mapping from field-name to the corresponding key (as used in fields()).
1742 * Array(string $name => string $uniqueName).
1744 public static function &fieldKeys() {
1745 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1746 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1748 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1752 * Returns the names of this table
1756 public static function getTableName() {
1757 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1761 * Returns if this table needs to be logged
1765 public function getLog() {
1770 * Returns the list of fields that can be imported
1772 * @param bool $prefix
1776 public static function &import($prefix = FALSE) {
1777 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'event', $prefix, []);
1782 * Returns the list of fields that can be exported
1784 * @param bool $prefix
1788 public static function &export($prefix = FALSE) {
1789 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'event', $prefix, []);
1794 * Returns the list of indices
1796 * @param bool $localize
1800 public static function indices($localize = TRUE) {
1802 'index_event_type_id' => [
1803 'name' => 'index_event_type_id',
1805 0 => 'event_type_id',
1807 'localizable' => FALSE,
1808 'sig' => 'civicrm_event::0::event_type_id',
1810 'index_participant_listing_id' => [
1811 'name' => 'index_participant_listing_id',
1813 0 => 'participant_listing_id',
1815 'localizable' => FALSE,
1816 'sig' => 'civicrm_event::0::participant_listing_id',
1818 'index_parent_event_id' => [
1819 'name' => 'index_parent_event_id',
1821 0 => 'parent_event_id',
1823 'localizable' => FALSE,
1824 'sig' => 'civicrm_event::0::parent_event_id',
1827 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;