5 * @copyright CiviCRM LLC (c) 2004-2019
7 * Generated from xml/schema/CRM/Event/Event.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:6fc495deedb92d867cbfb452e52e1106)
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 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = TRUE;
39 * Event Title (e.g. Fall Fundraiser Dinner)
46 * Brief summary of event. Text and html allowed. Displayed on Event Registration form and can be used on other CMS pages which need an event summary.
53 * Full description of event. Text and html allowed. Displayed on built-in Event Information screens.
60 * Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.
64 public $event_type_id;
67 * Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.
71 public $participant_listing_id;
74 * Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.
81 * Date and time that event starts.
88 * Date and time that event ends. May be NULL if no defined end date/time
95 * If true, include registration link on Event Info page.
99 public $is_online_registration;
102 * Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.
106 public $registration_link_text;
109 * Date and time that online registration starts.
113 public $registration_start_date;
116 * Date and time that online registration ends.
120 public $registration_end_date;
123 * Maximum number of registered participants to allow. After max is reached, a custom Event Full message is displayed. If NULL, allow unlimited number of participants.
127 public $max_participants;
130 * Message to display on Event Information page and INSTEAD OF Event Registration form if maximum participants are signed up. Can include email address/info about getting on a waiting list, etc. Text and html allowed.
134 public $event_full_text;
137 * If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.
144 * Financial type assigned to paid event registrations for this event. Required if is_monetary is true.
148 public $financial_type_id;
151 * Payment Processors configured for this Event (if is_monetary is true)
155 public $payment_processor;
158 * Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?
165 * Is this Event enabled or disabled/cancelled?
177 * If true, show event location.
181 public $is_show_location;
184 * FK to Location Block ID
188 public $loc_block_id;
191 * Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.
195 public $default_role_id;
198 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
205 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
212 * Title for Confirmation page.
216 public $confirm_title;
219 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
223 public $confirm_text;
226 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
230 public $confirm_footer_text;
233 * If true, confirmation is automatically emailed to contact on successful registration.
237 public $is_email_confirm;
240 * text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now
244 public $confirm_email_text;
247 * FROM email name used for confirmation emails.
251 public $confirm_from_name;
254 * FROM email address used for confirmation emails.
258 public $confirm_from_email;
261 * comma-separated list of email addresses to cc each time a confirmation is sent
268 * comma-separated list of email addresses to bcc each time a confirmation is sent
275 * FK to civicrm_option_value.
279 public $default_fee_id;
282 * FK to civicrm_option_value.
286 public $default_discount_fee_id;
289 * Title for ThankYou page.
293 public $thankyou_title;
300 public $thankyou_text;
307 public $thankyou_footer_text;
310 * if true - allows the user to send payment directly to the org later
314 public $is_pay_later;
317 * The text displayed to the user in the main form
321 public $pay_later_text;
324 * The receipt sent to the user instead of the normal receipt text
328 public $pay_later_receipt;
331 * is partial payment enabled for this event
335 public $is_partial_payment;
338 * Initial amount label for partial payment
342 public $initial_amount_label;
345 * Initial amount help text for partial payment
349 public $initial_amount_help_text;
352 * Minimum initial amount for partial payment
356 public $min_initial_amount;
359 * if true - allows the user to register multiple participants for event
363 public $is_multiple_registrations;
366 * Maximum number of additional participants that can be registered on a single booking
370 public $max_additional_participants;
373 * if true - allows the user to register multiple registrations from same email address.
377 public $allow_same_participant_emails;
380 * Whether the event has waitlist support.
384 public $has_waitlist;
387 * Whether participants require approval before they can finish registering.
391 public $requires_approval;
394 * Expire pending but unconfirmed registrations after this many hours.
398 public $expiration_time;
401 * Allow self service cancellation or transfer for event?
405 public $allow_selfcancelxfer;
408 * Number of hours prior to event start date to allow self-service cancellation or transfer.
412 public $selfcancelxfer_time;
415 * Text to display when the event is full, but participants can signup for a waitlist.
419 public $waitlist_text;
422 * Text to display when the approval is required to complete registration for an event.
426 public $approval_req_text;
429 * whether the event has template
436 * Event Template Title
440 public $template_title;
443 * FK to civicrm_contact, who created this event
450 * Date and time that event was created.
454 public $created_date;
457 * 3 character string, value from config setting or input via user.
464 * The campaign for which this event has been created.
471 * Can people share the event through social media?
478 * If false, the event booking confirmation screen gets skipped
482 public $is_confirm_enabled;
485 * Implicit FK to civicrm_event: parent event
489 public $parent_event_id;
492 * Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.
496 public $slot_label_id;
499 * Rule to use when matching registrations for this event
503 public $dedupe_rule_group_id;
506 * if true than billing block is required this event
510 public $is_billing_required;
515 public function __construct() {
516 $this->__table
= 'civicrm_event';
517 parent
::__construct();
521 * Returns foreign keys and entity references.
524 * [CRM_Core_Reference_Interface]
526 public static function getReferenceColumns() {
527 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
528 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
529 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'loc_block_id', 'civicrm_loc_block', 'id');
530 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'created_id', 'civicrm_contact', 'id');
531 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
532 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'dedupe_rule_group_id', 'civicrm_dedupe_rule_group', 'id');
533 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
535 return Civi
::$statics[__CLASS__
]['links'];
539 * Returns all the column names of this table
543 public static function &fields() {
544 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
545 Civi
::$statics[__CLASS__
]['fields'] = [
548 'type' => CRM_Utils_Type
::T_INT
,
549 'title' => ts('Event ID'),
550 'description' => ts('Event'),
552 'where' => 'civicrm_event.id',
553 'table_name' => 'civicrm_event',
555 'bao' => 'CRM_Event_BAO_Event',
560 'type' => CRM_Utils_Type
::T_STRING
,
561 'title' => ts('Event Title'),
562 'description' => ts('Event Title (e.g. Fall Fundraiser Dinner)'),
564 'size' => CRM_Utils_Type
::HUGE
,
566 'where' => 'civicrm_event.title',
567 'headerPattern' => '/(event.)?title$/i',
569 'table_name' => 'civicrm_event',
571 'bao' => 'CRM_Event_BAO_Event',
579 'type' => CRM_Utils_Type
::T_TEXT
,
580 'title' => ts('Event Summary'),
581 'description' => 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.'),
584 'where' => 'civicrm_event.summary',
585 'table_name' => 'civicrm_event',
587 'bao' => 'CRM_Event_BAO_Event',
590 'type' => 'TextArea',
593 'event_description' => [
594 'name' => 'description',
595 'type' => CRM_Utils_Type
::T_TEXT
,
596 'title' => ts('Event Description'),
597 'description' => ts('Full description of event. Text and html allowed. Displayed on built-in Event Information screens.'),
600 'where' => 'civicrm_event.description',
601 'table_name' => 'civicrm_event',
603 'bao' => 'CRM_Event_BAO_Event',
606 'type' => 'RichTextEditor',
610 'name' => 'event_type_id',
611 'type' => CRM_Utils_Type
::T_INT
,
612 'title' => ts('Event Type'),
613 'description' => ts('Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.'),
614 'where' => 'civicrm_event.event_type_id',
616 'table_name' => 'civicrm_event',
618 'bao' => 'CRM_Event_BAO_Event',
623 'pseudoconstant' => [
624 'optionGroupName' => 'event_type',
625 'optionEditPath' => 'civicrm/admin/options/event_type',
628 'participant_listing_id' => [
629 'name' => 'participant_listing_id',
630 'type' => CRM_Utils_Type
::T_INT
,
631 'title' => ts('Participant Listing'),
632 'description' => ts('Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.'),
633 'where' => 'civicrm_event.participant_listing_id',
635 'table_name' => 'civicrm_event',
637 'bao' => 'CRM_Event_BAO_Event',
642 'pseudoconstant' => [
643 'optionGroupName' => 'participant_listing',
644 'optionEditPath' => 'civicrm/admin/options/participant_listing',
648 'name' => 'is_public',
649 'type' => CRM_Utils_Type
::T_BOOLEAN
,
650 'title' => ts('Is Event Public'),
651 'description' => ts('Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.'),
652 'where' => 'civicrm_event.is_public',
654 'table_name' => 'civicrm_event',
656 'bao' => 'CRM_Event_BAO_Event',
659 'type' => 'CheckBox',
662 'event_start_date' => [
663 'name' => 'start_date',
664 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
665 'title' => ts('Event Start Date'),
666 'description' => ts('Date and time that event starts.'),
668 'where' => 'civicrm_event.start_date',
669 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
671 'table_name' => 'civicrm_event',
673 'bao' => 'CRM_Event_BAO_Event',
676 'type' => 'Select Date',
677 'formatType' => 'activityDateTime',
680 'event_end_date' => [
681 'name' => 'end_date',
682 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
683 'title' => ts('Event End Date'),
684 'description' => ts('Date and time that event ends. May be NULL if no defined end date/time'),
686 'where' => 'civicrm_event.end_date',
687 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
689 'table_name' => 'civicrm_event',
691 'bao' => 'CRM_Event_BAO_Event',
694 'type' => 'Select Date',
695 'formatType' => 'activityDateTime',
698 'is_online_registration' => [
699 'name' => 'is_online_registration',
700 'type' => CRM_Utils_Type
::T_BOOLEAN
,
701 'title' => ts('Is Online Registration'),
702 'description' => ts('If true, include registration link on Event Info page.'),
703 'where' => 'civicrm_event.is_online_registration',
705 'table_name' => 'civicrm_event',
707 'bao' => 'CRM_Event_BAO_Event',
710 'type' => 'CheckBox',
713 'registration_link_text' => [
714 'name' => 'registration_link_text',
715 'type' => CRM_Utils_Type
::T_STRING
,
716 'title' => ts('Event Registration Link Text'),
717 'description' => ts('Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.'),
719 'size' => CRM_Utils_Type
::HUGE
,
720 'where' => 'civicrm_event.registration_link_text',
721 'table_name' => 'civicrm_event',
723 'bao' => 'CRM_Event_BAO_Event',
729 'registration_start_date' => [
730 'name' => 'registration_start_date',
731 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
732 'title' => ts('Registration Start Date'),
733 'description' => ts('Date and time that online registration starts.'),
734 'where' => 'civicrm_event.registration_start_date',
735 'table_name' => 'civicrm_event',
737 'bao' => 'CRM_Event_BAO_Event',
740 'type' => 'Select Date',
741 'formatType' => 'activityDateTime',
744 'registration_end_date' => [
745 'name' => 'registration_end_date',
746 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
747 'title' => ts('Registration End Date'),
748 'description' => ts('Date and time that online registration ends.'),
749 'where' => 'civicrm_event.registration_end_date',
750 'table_name' => 'civicrm_event',
752 'bao' => 'CRM_Event_BAO_Event',
755 'type' => 'Select Date',
756 'formatType' => 'activityDateTime',
759 'max_participants' => [
760 'name' => 'max_participants',
761 'type' => CRM_Utils_Type
::T_INT
,
762 'title' => ts('Max Participants'),
763 '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.'),
764 'where' => 'civicrm_event.max_participants',
766 'table_name' => 'civicrm_event',
768 'bao' => 'CRM_Event_BAO_Event',
774 'event_full_text' => [
775 'name' => 'event_full_text',
776 'type' => CRM_Utils_Type
::T_TEXT
,
777 'title' => ts('Event Information'),
778 '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.'),
781 'where' => 'civicrm_event.event_full_text',
782 'table_name' => 'civicrm_event',
784 'bao' => 'CRM_Event_BAO_Event',
787 'type' => 'TextArea',
791 'name' => 'is_monetary',
792 'type' => CRM_Utils_Type
::T_BOOLEAN
,
793 'title' => ts('Is this a PAID event?'),
794 'description' => ts('If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.'),
795 'where' => 'civicrm_event.is_monetary',
797 'table_name' => 'civicrm_event',
799 'bao' => 'CRM_Event_BAO_Event',
802 'type' => 'CheckBox',
805 'financial_type_id' => [
806 'name' => 'financial_type_id',
807 'type' => CRM_Utils_Type
::T_INT
,
808 'title' => ts('Financial Type'),
809 'description' => ts('Financial type assigned to paid event registrations for this event. Required if is_monetary is true.'),
810 'where' => 'civicrm_event.financial_type_id',
812 'table_name' => 'civicrm_event',
814 'bao' => 'CRM_Event_BAO_Event',
819 'pseudoconstant' => [
820 'table' => 'civicrm_financial_type',
822 'labelColumn' => 'name',
825 'payment_processor' => [
826 'name' => 'payment_processor',
827 'type' => CRM_Utils_Type
::T_STRING
,
828 'title' => ts('Payment Processor'),
829 'description' => ts('Payment Processors configured for this Event (if is_monetary is true)'),
831 'size' => CRM_Utils_Type
::HUGE
,
832 'where' => 'civicrm_event.payment_processor',
833 'table_name' => 'civicrm_event',
835 'bao' => 'CRM_Event_BAO_Event',
840 'pseudoconstant' => [
841 'table' => 'civicrm_payment_processor',
843 'labelColumn' => 'name',
848 'type' => CRM_Utils_Type
::T_BOOLEAN
,
849 'title' => ts('Map Enabled'),
850 'description' => ts('Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?'),
851 'where' => 'civicrm_event.is_map',
853 'table_name' => 'civicrm_event',
855 'bao' => 'CRM_Event_BAO_Event',
858 'type' => 'CheckBox',
862 'name' => 'is_active',
863 'type' => CRM_Utils_Type
::T_BOOLEAN
,
864 'title' => ts('Is Active'),
865 'description' => ts('Is this Event enabled or disabled/cancelled?'),
866 'where' => 'civicrm_event.is_active',
868 'table_name' => 'civicrm_event',
870 'bao' => 'CRM_Event_BAO_Event',
873 'type' => 'CheckBox',
877 'name' => 'fee_label',
878 'type' => CRM_Utils_Type
::T_STRING
,
879 'title' => ts('Fee Label'),
881 'size' => CRM_Utils_Type
::HUGE
,
883 'where' => 'civicrm_event.fee_label',
884 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
886 'table_name' => 'civicrm_event',
888 'bao' => 'CRM_Event_BAO_Event',
894 'is_show_location' => [
895 'name' => 'is_show_location',
896 'type' => CRM_Utils_Type
::T_BOOLEAN
,
897 'title' => ts('show location'),
898 'description' => ts('If true, show event location.'),
899 'where' => 'civicrm_event.is_show_location',
901 'table_name' => 'civicrm_event',
903 'bao' => 'CRM_Event_BAO_Event',
906 'type' => 'CheckBox',
910 'name' => 'loc_block_id',
911 'type' => CRM_Utils_Type
::T_INT
,
912 'title' => ts('Location Block ID'),
913 'description' => ts('FK to Location Block ID'),
914 'where' => 'civicrm_event.loc_block_id',
915 'table_name' => 'civicrm_event',
917 'bao' => 'CRM_Event_BAO_Event',
919 'FKClassName' => 'CRM_Core_DAO_LocBlock',
921 'default_role_id' => [
922 'name' => 'default_role_id',
923 'type' => CRM_Utils_Type
::T_INT
,
924 'title' => ts('Default Role'),
925 'description' => ts('Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.'),
927 'where' => 'civicrm_event.default_role_id',
930 'table_name' => 'civicrm_event',
932 'bao' => 'CRM_Event_BAO_Event',
937 'pseudoconstant' => [
938 'optionGroupName' => 'participant_role',
939 'optionEditPath' => 'civicrm/admin/options/participant_role',
943 'name' => 'intro_text',
944 'type' => CRM_Utils_Type
::T_TEXT
,
945 'title' => ts('Introductory Message'),
946 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
949 'where' => 'civicrm_event.intro_text',
950 'table_name' => 'civicrm_event',
952 'bao' => 'CRM_Event_BAO_Event',
955 'type' => 'RichTextEditor',
959 'name' => 'footer_text',
960 'type' => CRM_Utils_Type
::T_TEXT
,
961 'title' => ts('Footer Message'),
962 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
965 'where' => 'civicrm_event.footer_text',
966 'table_name' => 'civicrm_event',
968 'bao' => 'CRM_Event_BAO_Event',
971 'type' => 'RichTextEditor',
975 'name' => 'confirm_title',
976 'type' => CRM_Utils_Type
::T_STRING
,
977 'title' => ts('Confirmation Title'),
978 'description' => ts('Title for Confirmation page.'),
980 'size' => CRM_Utils_Type
::HUGE
,
981 'where' => 'civicrm_event.confirm_title',
983 'table_name' => 'civicrm_event',
985 'bao' => 'CRM_Event_BAO_Event',
992 'name' => 'confirm_text',
993 'type' => CRM_Utils_Type
::T_TEXT
,
994 'title' => ts('Confirm Text'),
995 'description' => ts('Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.'),
998 'where' => 'civicrm_event.confirm_text',
999 'table_name' => 'civicrm_event',
1000 'entity' => 'Event',
1001 'bao' => 'CRM_Event_BAO_Event',
1004 'type' => 'RichTextEditor',
1007 'confirm_footer_text' => [
1008 'name' => 'confirm_footer_text',
1009 'type' => CRM_Utils_Type
::T_TEXT
,
1010 'title' => ts('Footer Text'),
1011 'description' => ts('Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.'),
1014 'where' => 'civicrm_event.confirm_footer_text',
1015 'table_name' => 'civicrm_event',
1016 'entity' => 'Event',
1017 'bao' => 'CRM_Event_BAO_Event',
1020 'type' => 'RichTextEditor',
1023 'is_email_confirm' => [
1024 'name' => 'is_email_confirm',
1025 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1026 'title' => ts('Is confirm email'),
1027 'description' => ts('If true, confirmation is automatically emailed to contact on successful registration.'),
1028 'where' => 'civicrm_event.is_email_confirm',
1030 'table_name' => 'civicrm_event',
1031 'entity' => 'Event',
1032 'bao' => 'CRM_Event_BAO_Event',
1035 'type' => 'CheckBox',
1038 'confirm_email_text' => [
1039 'name' => 'confirm_email_text',
1040 'type' => CRM_Utils_Type
::T_TEXT
,
1041 'title' => ts('Confirmation Email Text'),
1042 'description' => ts('text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now'),
1045 'where' => 'civicrm_event.confirm_email_text',
1046 'table_name' => 'civicrm_event',
1047 'entity' => 'Event',
1048 'bao' => 'CRM_Event_BAO_Event',
1051 'type' => 'TextArea',
1054 'confirm_from_name' => [
1055 'name' => 'confirm_from_name',
1056 'type' => CRM_Utils_Type
::T_STRING
,
1057 'title' => ts('Confirm From Name'),
1058 'description' => ts('FROM email name used for confirmation emails.'),
1060 'size' => CRM_Utils_Type
::HUGE
,
1061 'where' => 'civicrm_event.confirm_from_name',
1062 'table_name' => 'civicrm_event',
1063 'entity' => 'Event',
1064 'bao' => 'CRM_Event_BAO_Event',
1070 'confirm_from_email' => [
1071 'name' => 'confirm_from_email',
1072 'type' => CRM_Utils_Type
::T_STRING
,
1073 'title' => ts('Confirm From Email'),
1074 'description' => ts('FROM email address used for confirmation emails.'),
1076 'size' => CRM_Utils_Type
::HUGE
,
1077 'where' => 'civicrm_event.confirm_from_email',
1078 'table_name' => 'civicrm_event',
1079 'entity' => 'Event',
1080 'bao' => 'CRM_Event_BAO_Event',
1087 'name' => 'cc_confirm',
1088 'type' => CRM_Utils_Type
::T_STRING
,
1089 'title' => ts('Cc Confirm'),
1090 'description' => ts('comma-separated list of email addresses to cc each time a confirmation is sent'),
1092 'size' => CRM_Utils_Type
::HUGE
,
1093 'where' => 'civicrm_event.cc_confirm',
1094 'table_name' => 'civicrm_event',
1095 'entity' => 'Event',
1096 'bao' => 'CRM_Event_BAO_Event',
1103 'name' => 'bcc_confirm',
1104 'type' => CRM_Utils_Type
::T_STRING
,
1105 'title' => ts('Bcc Confirm'),
1106 'description' => ts('comma-separated list of email addresses to bcc each time a confirmation is sent'),
1108 'size' => CRM_Utils_Type
::HUGE
,
1109 'where' => 'civicrm_event.bcc_confirm',
1110 'table_name' => 'civicrm_event',
1111 'entity' => 'Event',
1112 'bao' => 'CRM_Event_BAO_Event',
1118 'default_fee_id' => [
1119 'name' => 'default_fee_id',
1120 'type' => CRM_Utils_Type
::T_INT
,
1121 'title' => ts('Default Fee ID'),
1122 'description' => ts('FK to civicrm_option_value.'),
1123 'where' => 'civicrm_event.default_fee_id',
1124 'table_name' => 'civicrm_event',
1125 'entity' => 'Event',
1126 'bao' => 'CRM_Event_BAO_Event',
1129 'default_discount_fee_id' => [
1130 'name' => 'default_discount_fee_id',
1131 'type' => CRM_Utils_Type
::T_INT
,
1132 'title' => ts('Default Discount Fee ID'),
1133 'description' => ts('FK to civicrm_option_value.'),
1134 'where' => 'civicrm_event.default_discount_fee_id',
1135 'table_name' => 'civicrm_event',
1136 'entity' => 'Event',
1137 'bao' => 'CRM_Event_BAO_Event',
1140 'thankyou_title' => [
1141 'name' => 'thankyou_title',
1142 'type' => CRM_Utils_Type
::T_STRING
,
1143 'title' => ts('ThankYou Title'),
1144 'description' => ts('Title for ThankYou page.'),
1146 'size' => CRM_Utils_Type
::HUGE
,
1147 'where' => 'civicrm_event.thankyou_title',
1148 'default' => 'NULL',
1149 'table_name' => 'civicrm_event',
1150 'entity' => 'Event',
1151 'bao' => 'CRM_Event_BAO_Event',
1157 'thankyou_text' => [
1158 'name' => 'thankyou_text',
1159 'type' => CRM_Utils_Type
::T_TEXT
,
1160 'title' => ts('ThankYou Text'),
1161 'description' => ts('ThankYou Text.'),
1164 'where' => 'civicrm_event.thankyou_text',
1165 'table_name' => 'civicrm_event',
1166 'entity' => 'Event',
1167 'bao' => 'CRM_Event_BAO_Event',
1170 'type' => 'RichTextEditor',
1173 'thankyou_footer_text' => [
1174 'name' => 'thankyou_footer_text',
1175 'type' => CRM_Utils_Type
::T_TEXT
,
1176 'title' => ts('Footer Text'),
1177 'description' => ts('Footer message.'),
1180 'where' => 'civicrm_event.thankyou_footer_text',
1181 'table_name' => 'civicrm_event',
1182 'entity' => 'Event',
1183 'bao' => 'CRM_Event_BAO_Event',
1186 'type' => 'RichTextEditor',
1190 'name' => 'is_pay_later',
1191 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1192 'title' => ts('Pay Later Allowed'),
1193 'description' => ts('if true - allows the user to send payment directly to the org later'),
1194 'where' => 'civicrm_event.is_pay_later',
1196 'table_name' => 'civicrm_event',
1197 'entity' => 'Event',
1198 'bao' => 'CRM_Event_BAO_Event',
1201 'type' => 'CheckBox',
1204 'pay_later_text' => [
1205 'name' => 'pay_later_text',
1206 'type' => CRM_Utils_Type
::T_TEXT
,
1207 'title' => ts('Pay Later Text'),
1208 'description' => ts('The text displayed to the user in the main form'),
1209 'where' => 'civicrm_event.pay_later_text',
1210 'table_name' => 'civicrm_event',
1211 'entity' => 'Event',
1212 'bao' => 'CRM_Event_BAO_Event',
1215 'type' => 'RichTextEditor',
1218 'pay_later_receipt' => [
1219 'name' => 'pay_later_receipt',
1220 'type' => CRM_Utils_Type
::T_TEXT
,
1221 'title' => ts('Pay Later Receipt Text'),
1222 'description' => ts('The receipt sent to the user instead of the normal receipt text'),
1223 'where' => 'civicrm_event.pay_later_receipt',
1224 'table_name' => 'civicrm_event',
1225 'entity' => 'Event',
1226 'bao' => 'CRM_Event_BAO_Event',
1232 'is_partial_payment' => [
1233 'name' => 'is_partial_payment',
1234 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1235 'title' => ts('Partial Payments Enabled'),
1236 'description' => ts('is partial payment enabled for this event'),
1237 'where' => 'civicrm_event.is_partial_payment',
1239 'table_name' => 'civicrm_event',
1240 'entity' => 'Event',
1241 'bao' => 'CRM_Event_BAO_Event',
1244 'type' => 'CheckBox',
1247 'initial_amount_label' => [
1248 'name' => 'initial_amount_label',
1249 'type' => CRM_Utils_Type
::T_STRING
,
1250 'title' => ts('Initial Amount Label'),
1251 'description' => ts('Initial amount label for partial payment'),
1253 'size' => CRM_Utils_Type
::HUGE
,
1254 'where' => 'civicrm_event.initial_amount_label',
1255 'table_name' => 'civicrm_event',
1256 'entity' => 'Event',
1257 'bao' => 'CRM_Event_BAO_Event',
1263 'initial_amount_help_text' => [
1264 'name' => 'initial_amount_help_text',
1265 'type' => CRM_Utils_Type
::T_TEXT
,
1266 'title' => ts('Initial Amount Help Text'),
1267 'description' => ts('Initial amount help text for partial payment'),
1268 'where' => 'civicrm_event.initial_amount_help_text',
1269 'table_name' => 'civicrm_event',
1270 'entity' => 'Event',
1271 'bao' => 'CRM_Event_BAO_Event',
1277 'min_initial_amount' => [
1278 'name' => 'min_initial_amount',
1279 'type' => CRM_Utils_Type
::T_MONEY
,
1280 'title' => ts('Minimum Initial Amount'),
1281 'description' => ts('Minimum initial amount for partial payment'),
1286 'where' => 'civicrm_event.min_initial_amount',
1287 'table_name' => 'civicrm_event',
1288 'entity' => 'Event',
1289 'bao' => 'CRM_Event_BAO_Event',
1295 'is_multiple_registrations' => [
1296 'name' => 'is_multiple_registrations',
1297 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1298 'title' => ts('Allow Multiple Registrations'),
1299 'description' => ts('if true - allows the user to register multiple participants for event'),
1300 'where' => 'civicrm_event.is_multiple_registrations',
1302 'table_name' => 'civicrm_event',
1303 'entity' => 'Event',
1304 'bao' => 'CRM_Event_BAO_Event',
1307 'type' => 'CheckBox',
1310 'max_additional_participants' => [
1311 'name' => 'max_additional_participants',
1312 'type' => CRM_Utils_Type
::T_INT
,
1313 'title' => ts('Maximum number of additional participants per registration'),
1314 'description' => ts('Maximum number of additional participants that can be registered on a single booking'),
1315 'where' => 'civicrm_event.max_additional_participants',
1317 'table_name' => 'civicrm_event',
1318 'entity' => 'Event',
1319 'bao' => 'CRM_Event_BAO_Event',
1322 'allow_same_participant_emails' => [
1323 'name' => 'allow_same_participant_emails',
1324 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1325 'title' => ts('Does Event allow multiple registrations from same email address?'),
1326 'description' => ts('if true - allows the user to register multiple registrations from same email address.'),
1327 'where' => 'civicrm_event.allow_same_participant_emails',
1329 'table_name' => 'civicrm_event',
1330 'entity' => 'Event',
1331 'bao' => 'CRM_Event_BAO_Event',
1334 'type' => 'CheckBox',
1338 'name' => 'has_waitlist',
1339 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1340 'title' => ts('Waitlist Enabled'),
1341 'description' => ts('Whether the event has waitlist support.'),
1342 'where' => 'civicrm_event.has_waitlist',
1343 'table_name' => 'civicrm_event',
1344 'entity' => 'Event',
1345 'bao' => 'CRM_Event_BAO_Event',
1348 'type' => 'CheckBox',
1351 'requires_approval' => [
1352 'name' => 'requires_approval',
1353 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1354 'title' => ts('Requires Approval'),
1355 'description' => ts('Whether participants require approval before they can finish registering.'),
1356 'where' => 'civicrm_event.requires_approval',
1357 'table_name' => 'civicrm_event',
1358 'entity' => 'Event',
1359 'bao' => 'CRM_Event_BAO_Event',
1362 'type' => 'CheckBox',
1365 'expiration_time' => [
1366 'name' => 'expiration_time',
1367 'type' => CRM_Utils_Type
::T_INT
,
1368 'title' => ts('Expiration Time'),
1369 'description' => ts('Expire pending but unconfirmed registrations after this many hours.'),
1370 'where' => 'civicrm_event.expiration_time',
1371 'table_name' => 'civicrm_event',
1372 'entity' => 'Event',
1373 'bao' => 'CRM_Event_BAO_Event',
1379 'allow_selfcancelxfer' => [
1380 'name' => 'allow_selfcancelxfer',
1381 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1382 'title' => ts('Allow Self-service Cancellation or Transfer'),
1383 'description' => ts('Allow self service cancellation or transfer for event?'),
1384 'where' => 'civicrm_event.allow_selfcancelxfer',
1386 'table_name' => 'civicrm_event',
1387 'entity' => 'Event',
1388 'bao' => 'CRM_Event_BAO_Event',
1391 'type' => 'CheckBox',
1394 'selfcancelxfer_time' => [
1395 'name' => 'selfcancelxfer_time',
1396 'type' => CRM_Utils_Type
::T_INT
,
1397 'title' => ts('Self-service Cancellation or Transfer Time'),
1398 'description' => ts('Number of hours prior to event start date to allow self-service cancellation or transfer.'),
1399 'where' => 'civicrm_event.selfcancelxfer_time',
1401 'table_name' => 'civicrm_event',
1402 'entity' => 'Event',
1403 'bao' => 'CRM_Event_BAO_Event',
1409 'waitlist_text' => [
1410 'name' => 'waitlist_text',
1411 'type' => CRM_Utils_Type
::T_TEXT
,
1412 'title' => ts('Waitlist Text'),
1413 'description' => ts('Text to display when the event is full, but participants can signup for a waitlist.'),
1416 'where' => 'civicrm_event.waitlist_text',
1417 'table_name' => 'civicrm_event',
1418 'entity' => 'Event',
1419 'bao' => 'CRM_Event_BAO_Event',
1422 'type' => 'TextArea',
1425 'approval_req_text' => [
1426 'name' => 'approval_req_text',
1427 'type' => CRM_Utils_Type
::T_TEXT
,
1428 'title' => ts('Approval Req Text'),
1429 'description' => ts('Text to display when the approval is required to complete registration for an event.'),
1432 'where' => 'civicrm_event.approval_req_text',
1433 'table_name' => 'civicrm_event',
1434 'entity' => 'Event',
1435 'bao' => 'CRM_Event_BAO_Event',
1438 'type' => 'TextArea',
1442 'name' => 'is_template',
1443 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1444 'title' => ts('Is an Event Template'),
1445 'description' => ts('whether the event has template'),
1447 'where' => 'civicrm_event.is_template',
1449 'table_name' => 'civicrm_event',
1450 'entity' => 'Event',
1451 'bao' => 'CRM_Event_BAO_Event',
1454 'type' => 'CheckBox',
1457 'template_title' => [
1458 'name' => 'template_title',
1459 'type' => CRM_Utils_Type
::T_STRING
,
1460 'title' => ts('Event Template Title'),
1461 'description' => ts('Event Template Title'),
1463 'size' => CRM_Utils_Type
::HUGE
,
1465 'where' => 'civicrm_event.template_title',
1466 'headerPattern' => '/(template.)?title$/i',
1468 'table_name' => 'civicrm_event',
1469 'entity' => 'Event',
1470 'bao' => 'CRM_Event_BAO_Event',
1477 'name' => 'created_id',
1478 'type' => CRM_Utils_Type
::T_INT
,
1479 'title' => ts('Created By Contact ID'),
1480 'description' => ts('FK to civicrm_contact, who created this event'),
1481 'where' => 'civicrm_event.created_id',
1482 'table_name' => 'civicrm_event',
1483 'entity' => 'Event',
1484 'bao' => 'CRM_Event_BAO_Event',
1486 'FKClassName' => 'CRM_Contact_DAO_Contact',
1489 'name' => 'created_date',
1490 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
1491 'title' => ts('Event Created Date'),
1492 'description' => ts('Date and time that event was created.'),
1493 'where' => 'civicrm_event.created_date',
1494 'table_name' => 'civicrm_event',
1495 'entity' => 'Event',
1496 'bao' => 'CRM_Event_BAO_Event',
1500 'name' => 'currency',
1501 'type' => CRM_Utils_Type
::T_STRING
,
1502 'title' => ts('Currency'),
1503 'description' => ts('3 character string, value from config setting or input via user.'),
1505 'size' => CRM_Utils_Type
::FOUR
,
1507 'where' => 'civicrm_event.currency',
1508 'headerPattern' => '/cur(rency)?/i',
1509 'dataPattern' => '/^[A-Z]{3}$/i',
1511 'table_name' => 'civicrm_event',
1512 'entity' => 'Event',
1513 'bao' => 'CRM_Event_BAO_Event',
1518 'pseudoconstant' => [
1519 'table' => 'civicrm_currency',
1520 'keyColumn' => 'name',
1521 'labelColumn' => 'full_name',
1522 'nameColumn' => 'name',
1526 'name' => 'campaign_id',
1527 'type' => CRM_Utils_Type
::T_INT
,
1528 'title' => ts('Campaign'),
1529 'description' => ts('The campaign for which this event has been created.'),
1530 'where' => 'civicrm_event.campaign_id',
1531 'table_name' => 'civicrm_event',
1532 'entity' => 'Event',
1533 'bao' => 'CRM_Event_BAO_Event',
1535 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1537 'type' => 'EntityRef',
1539 'pseudoconstant' => [
1540 'table' => 'civicrm_campaign',
1541 'keyColumn' => 'id',
1542 'labelColumn' => 'title',
1546 'name' => 'is_share',
1547 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1548 'title' => ts('Is shared through social media'),
1549 'description' => ts('Can people share the event through social media?'),
1550 'where' => 'civicrm_event.is_share',
1552 'table_name' => 'civicrm_event',
1553 'entity' => 'Event',
1554 'bao' => 'CRM_Event_BAO_Event',
1557 'type' => 'CheckBox',
1560 'is_confirm_enabled' => [
1561 'name' => 'is_confirm_enabled',
1562 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1563 'title' => ts('Is the booking confirmation screen enabled?'),
1564 'description' => ts('If false, the event booking confirmation screen gets skipped'),
1565 'where' => 'civicrm_event.is_confirm_enabled',
1567 'table_name' => 'civicrm_event',
1568 'entity' => 'Event',
1569 'bao' => 'CRM_Event_BAO_Event',
1572 'type' => 'CheckBox',
1575 'parent_event_id' => [
1576 'name' => 'parent_event_id',
1577 'type' => CRM_Utils_Type
::T_INT
,
1578 'title' => ts('Parent Event ID'),
1579 'description' => ts('Implicit FK to civicrm_event: parent event'),
1580 'where' => 'civicrm_event.parent_event_id',
1581 'default' => 'NULL',
1582 'table_name' => 'civicrm_event',
1583 'entity' => 'Event',
1584 'bao' => 'CRM_Event_BAO_Event',
1587 'type' => 'EntityRef',
1590 'slot_label_id' => [
1591 'name' => 'slot_label_id',
1592 'type' => CRM_Utils_Type
::T_INT
,
1593 'title' => ts('Subevent Slot Label ID'),
1594 'description' => ts('Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.'),
1595 'where' => 'civicrm_event.slot_label_id',
1596 'default' => 'NULL',
1597 'table_name' => 'civicrm_event',
1598 'entity' => 'Event',
1599 'bao' => 'CRM_Event_BAO_Event',
1605 'dedupe_rule_group_id' => [
1606 'name' => 'dedupe_rule_group_id',
1607 'type' => CRM_Utils_Type
::T_INT
,
1608 'title' => ts('Dedupe Rule'),
1609 'description' => ts('Rule to use when matching registrations for this event'),
1610 'where' => 'civicrm_event.dedupe_rule_group_id',
1611 'default' => 'NULL',
1612 'table_name' => 'civicrm_event',
1613 'entity' => 'Event',
1614 'bao' => 'CRM_Event_BAO_Event',
1616 'FKClassName' => 'CRM_Dedupe_DAO_RuleGroup',
1620 'pseudoconstant' => [
1621 'table' => 'civicrm_dedupe_rule_group',
1622 'keyColumn' => 'id',
1623 'labelColumn' => 'title',
1624 'nameColumn' => 'name',
1627 'is_billing_required' => [
1628 'name' => 'is_billing_required',
1629 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1630 'title' => ts('Is billing block required'),
1631 'description' => ts('if true than billing block is required this event'),
1632 'where' => 'civicrm_event.is_billing_required',
1634 'table_name' => 'civicrm_event',
1635 'entity' => 'Event',
1636 'bao' => 'CRM_Event_BAO_Event',
1639 'type' => 'CheckBox',
1643 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1645 return Civi
::$statics[__CLASS__
]['fields'];
1649 * Return a mapping from field-name to the corresponding key (as used in fields()).
1652 * Array(string $name => string $uniqueName).
1654 public static function &fieldKeys() {
1655 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1656 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1658 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1662 * Returns the names of this table
1666 public static function getTableName() {
1667 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1671 * Returns if this table needs to be logged
1675 public function getLog() {
1680 * Returns the list of fields that can be imported
1682 * @param bool $prefix
1686 public static function &import($prefix = FALSE) {
1687 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'event', $prefix, []);
1692 * Returns the list of fields that can be exported
1694 * @param bool $prefix
1698 public static function &export($prefix = FALSE) {
1699 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'event', $prefix, []);
1704 * Returns the list of indices
1706 * @param bool $localize
1710 public static function indices($localize = TRUE) {
1712 'index_event_type_id' => [
1713 'name' => 'index_event_type_id',
1715 0 => 'event_type_id',
1717 'localizable' => FALSE,
1718 'sig' => 'civicrm_event::0::event_type_id',
1720 'index_participant_listing_id' => [
1721 'name' => 'index_participant_listing_id',
1723 0 => 'participant_listing_id',
1725 'localizable' => FALSE,
1726 'sig' => 'civicrm_event::0::participant_listing_id',
1728 'index_parent_event_id' => [
1729 'name' => 'index_parent_event_id',
1731 0 => 'parent_event_id',
1733 'localizable' => FALSE,
1734 'sig' => 'civicrm_event::0::parent_event_id',
1737 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;