3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2017
31 * Generated from xml/schema/CRM/Event/Event.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:6c0950f3a5f6305f8d7e0a05d4703018)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Event_DAO_Event constructor.
40 class CRM_Event_DAO_Event
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_event';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
60 * Event Title (e.g. Fall Fundraiser Dinner)
66 * 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.
72 * Full description of event. Text and html allowed. Displayed on built-in Event Information screens.
78 * Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.
82 public $event_type_id;
84 * Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.
88 public $participant_listing_id;
90 * Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.
96 * Date and time that event starts.
102 * Date and time that event ends. May be NULL if no defined end date/time
108 * If true, include registration link on Event Info page.
112 public $is_online_registration;
114 * Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.
118 public $registration_link_text;
120 * Date and time that online registration starts.
124 public $registration_start_date;
126 * Date and time that online registration ends.
130 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;
138 * 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.
142 public $event_full_text;
144 * If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.
150 * Financial type assigned to paid event registrations for this event. Required if is_monetary is true.
154 public $financial_type_id;
156 * Payment Processors configured for this Event (if is_monetary is true)
160 public $payment_processor;
162 * Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?
168 * Is this Event enabled or disabled/cancelled?
179 * If true, show event location.
183 public $is_show_location;
185 * FK to Location Block ID
189 public $loc_block_id;
191 * Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.
195 public $default_role_id;
197 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
203 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
209 * Title for Confirmation page.
213 public $confirm_title;
215 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
219 public $confirm_text;
221 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
225 public $confirm_footer_text;
227 * If true, confirmation is automatically emailed to contact on successful registration.
231 public $is_email_confirm;
233 * text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now
237 public $confirm_email_text;
239 * FROM email name used for confirmation emails.
243 public $confirm_from_name;
245 * FROM email address used for confirmation emails.
249 public $confirm_from_email;
251 * comma-separated list of email addresses to cc each time a confirmation is sent
257 * comma-separated list of email addresses to bcc each time a confirmation is sent
263 * FK to civicrm_option_value.
267 public $default_fee_id;
269 * FK to civicrm_option_value.
273 public $default_discount_fee_id;
275 * Title for ThankYou page.
279 public $thankyou_title;
285 public $thankyou_text;
291 public $thankyou_footer_text;
293 * if true - allows the user to send payment directly to the org later
297 public $is_pay_later;
299 * The text displayed to the user in the main form
303 public $pay_later_text;
305 * The receipt sent to the user instead of the normal receipt text
309 public $pay_later_receipt;
311 * is partial payment enabled for this event
315 public $is_partial_payment;
317 * Initial amount label for partial payment
321 public $initial_amount_label;
323 * Initial amount help text for partial payment
327 public $initial_amount_help_text;
329 * Minimum initial amount for partial payment
333 public $min_initial_amount;
335 * if true - allows the user to register multiple participants for event
339 public $is_multiple_registrations;
341 * Maximum number of additional participants that can be registered on a single booking
345 public $max_additional_participants;
347 * if true - allows the user to register multiple registrations from same email address.
351 public $allow_same_participant_emails;
353 * Whether the event has waitlist support.
357 public $has_waitlist;
359 * Whether participants require approval before they can finish registering.
363 public $requires_approval;
365 * Expire pending but unconfirmed registrations after this many hours.
369 public $expiration_time;
371 * Allow self service cancellation or transfer for event?
375 public $allow_selfcancelxfer;
377 * Number of hours prior to event start date to allow self-service cancellation or transfer.
381 public $selfcancelxfer_time;
383 * Text to display when the event is full, but participants can signup for a waitlist.
387 public $waitlist_text;
389 * Text to display when the approval is required to complete registration for an event.
393 public $approval_req_text;
395 * whether the event has template
401 * Event Template Title
405 public $template_title;
407 * FK to civicrm_contact, who created this event
413 * Date and time that event was created.
417 public $created_date;
419 * 3 character string, value from config setting or input via user.
425 * The campaign for which this event has been created.
431 * Can people share the event through social media?
437 * If false, the event booking confirmation screen gets skipped
441 public $is_confirm_enabled;
443 * Implicit FK to civicrm_event: parent event
447 public $parent_event_id;
449 * Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.
453 public $slot_label_id;
455 * Rule to use when matching registrations for this event
459 public $dedupe_rule_group_id;
461 * if true than billing block is required this event
465 public $is_billing_required;
469 function __construct() {
470 $this->__table
= 'civicrm_event';
471 parent
::__construct();
474 * Returns foreign keys and entity references.
477 * [CRM_Core_Reference_Interface]
479 static function getReferenceColumns() {
480 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
481 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
482 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'loc_block_id', 'civicrm_loc_block', 'id');
483 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'created_id', 'civicrm_contact', 'id');
484 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
485 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'dedupe_rule_group_id', 'civicrm_dedupe_rule_group', 'id');
486 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
488 return Civi
::$statics[__CLASS__
]['links'];
491 * Returns all the column names of this table
495 static function &fields() {
496 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
497 Civi
::$statics[__CLASS__
]['fields'] = array(
500 'type' => CRM_Utils_Type
::T_INT
,
501 'title' => ts('Event ID') ,
502 'description' => 'Event',
504 'table_name' => 'civicrm_event',
506 'bao' => 'CRM_Event_BAO_Event',
509 'event_title' => array(
511 'type' => CRM_Utils_Type
::T_STRING
,
512 'title' => ts('Event Title') ,
513 'description' => 'Event Title (e.g. Fall Fundraiser Dinner)',
515 'size' => CRM_Utils_Type
::HUGE
,
517 'where' => 'civicrm_event.title',
518 'headerPattern' => '/(event.)?title$/i',
521 'table_name' => 'civicrm_event',
523 'bao' => 'CRM_Event_BAO_Event',
531 'type' => CRM_Utils_Type
::T_TEXT
,
532 'title' => ts('Event Summary') ,
533 'description' => 'Brief summary of event. Text and html allowed. Displayed on Event Registration form and can be used on other CMS pages which need an event summary.',
536 'table_name' => 'civicrm_event',
538 'bao' => 'CRM_Event_BAO_Event',
541 'type' => 'TextArea',
544 'event_description' => array(
545 'name' => 'description',
546 'type' => CRM_Utils_Type
::T_TEXT
,
547 'title' => ts('Event Description') ,
548 'description' => 'Full description of event. Text and html allowed. Displayed on built-in Event Information screens.',
551 'table_name' => 'civicrm_event',
553 'bao' => 'CRM_Event_BAO_Event',
556 'type' => 'TextArea',
559 'event_type_id' => array(
560 'name' => 'event_type_id',
561 'type' => CRM_Utils_Type
::T_INT
,
562 'title' => ts('Event Type') ,
563 'description' => 'Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.',
564 'table_name' => 'civicrm_event',
566 'bao' => 'CRM_Event_BAO_Event',
571 'pseudoconstant' => array(
572 'optionGroupName' => 'event_type',
573 'optionEditPath' => 'civicrm/admin/options/event_type',
576 'participant_listing_id' => array(
577 'name' => 'participant_listing_id',
578 'type' => CRM_Utils_Type
::T_INT
,
579 'title' => ts('Participant Listing') ,
580 'description' => 'Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.',
581 'table_name' => 'civicrm_event',
583 'bao' => 'CRM_Event_BAO_Event',
588 'pseudoconstant' => array(
589 'optionGroupName' => 'participant_listing',
590 'optionEditPath' => 'civicrm/admin/options/participant_listing',
593 'is_public' => array(
594 'name' => 'is_public',
595 'type' => CRM_Utils_Type
::T_BOOLEAN
,
596 'title' => ts('Is Event Public') ,
597 'description' => 'Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.',
599 'table_name' => 'civicrm_event',
601 'bao' => 'CRM_Event_BAO_Event',
604 'type' => 'CheckBox',
607 'event_start_date' => array(
608 'name' => 'start_date',
609 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
610 'title' => ts('Event Start Date') ,
611 'description' => 'Date and time that event starts.',
613 'where' => 'civicrm_event.start_date',
614 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
617 'table_name' => 'civicrm_event',
619 'bao' => 'CRM_Event_BAO_Event',
622 'type' => 'Select Date',
625 'event_end_date' => array(
626 'name' => 'end_date',
627 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
628 'title' => ts('Event End Date') ,
629 'description' => 'Date and time that event ends. May be NULL if no defined end date/time',
631 'where' => 'civicrm_event.end_date',
632 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
635 'table_name' => 'civicrm_event',
637 'bao' => 'CRM_Event_BAO_Event',
640 'type' => 'Select Date',
643 'is_online_registration' => array(
644 'name' => 'is_online_registration',
645 'type' => CRM_Utils_Type
::T_BOOLEAN
,
646 'title' => ts('Is Online Registration') ,
647 'description' => 'If true, include registration link on Event Info page.',
648 'table_name' => 'civicrm_event',
650 'bao' => 'CRM_Event_BAO_Event',
653 'type' => 'CheckBox',
656 'registration_link_text' => array(
657 'name' => 'registration_link_text',
658 'type' => CRM_Utils_Type
::T_STRING
,
659 'title' => ts('Event Registration Link Text') ,
660 'description' => 'Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.',
662 'size' => CRM_Utils_Type
::HUGE
,
663 'table_name' => 'civicrm_event',
665 'bao' => 'CRM_Event_BAO_Event',
671 'registration_start_date' => array(
672 'name' => 'registration_start_date',
673 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
674 'title' => ts('Registration Start Date') ,
675 'description' => 'Date and time that online registration starts.',
676 'table_name' => 'civicrm_event',
678 'bao' => 'CRM_Event_BAO_Event',
681 'type' => 'Select Date',
684 'registration_end_date' => array(
685 'name' => 'registration_end_date',
686 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
687 'title' => ts('Registration End Date') ,
688 'description' => 'Date and time that online registration ends.',
689 'table_name' => 'civicrm_event',
691 'bao' => 'CRM_Event_BAO_Event',
694 'type' => 'Select Date',
697 'max_participants' => array(
698 'name' => 'max_participants',
699 'type' => CRM_Utils_Type
::T_INT
,
700 'title' => ts('Max Participants') ,
701 'description' => 'Maximum number of registered participants to allow. After max is reached, a custom Event Full message is displayed. If NULL, allow unlimited number of participants.',
703 'table_name' => 'civicrm_event',
705 'bao' => 'CRM_Event_BAO_Event',
711 'event_full_text' => array(
712 'name' => 'event_full_text',
713 'type' => CRM_Utils_Type
::T_TEXT
,
714 'title' => ts('Event Information') ,
715 'description' => 'Message to display on Event Information page and INSTEAD OF Event Registration form if maximum participants are signed up. Can include email address/info about getting on a waiting list, etc. Text and html allowed.',
718 'table_name' => 'civicrm_event',
720 'bao' => 'CRM_Event_BAO_Event',
723 'type' => 'TextArea',
726 'is_monetary' => array(
727 'name' => 'is_monetary',
728 'type' => CRM_Utils_Type
::T_BOOLEAN
,
729 'title' => ts('Is this a PAID event?') ,
730 'description' => 'If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.',
731 'table_name' => 'civicrm_event',
733 'bao' => 'CRM_Event_BAO_Event',
736 'type' => 'CheckBox',
739 'financial_type_id' => array(
740 'name' => 'financial_type_id',
741 'type' => CRM_Utils_Type
::T_INT
,
742 'title' => ts('Financial Type') ,
743 'description' => 'Financial type assigned to paid event registrations for this event. Required if is_monetary is true.',
745 'table_name' => 'civicrm_event',
747 'bao' => 'CRM_Event_BAO_Event',
752 'pseudoconstant' => array(
753 'table' => 'civicrm_financial_type',
755 'labelColumn' => 'name',
758 'payment_processor' => array(
759 'name' => 'payment_processor',
760 'type' => CRM_Utils_Type
::T_STRING
,
761 'title' => ts('Payment Processor') ,
762 'description' => 'Payment Processors configured for this Event (if is_monetary is true)',
764 'size' => CRM_Utils_Type
::HUGE
,
765 'table_name' => 'civicrm_event',
767 'bao' => 'CRM_Event_BAO_Event',
772 'pseudoconstant' => array(
773 'table' => 'civicrm_payment_processor',
775 'labelColumn' => 'name',
780 'type' => CRM_Utils_Type
::T_BOOLEAN
,
781 'title' => ts('Map Enabled') ,
782 'description' => 'Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?',
783 'table_name' => 'civicrm_event',
785 'bao' => 'CRM_Event_BAO_Event',
788 'type' => 'CheckBox',
791 'is_active' => array(
792 'name' => 'is_active',
793 'type' => CRM_Utils_Type
::T_BOOLEAN
,
794 'title' => ts('Is Active') ,
795 'description' => 'Is this Event enabled or disabled/cancelled?',
796 'table_name' => 'civicrm_event',
798 'bao' => 'CRM_Event_BAO_Event',
801 'type' => 'CheckBox',
804 'fee_label' => array(
805 'name' => 'fee_label',
806 'type' => CRM_Utils_Type
::T_STRING
,
807 'title' => ts('Fee Label') ,
809 'size' => CRM_Utils_Type
::HUGE
,
811 'where' => 'civicrm_event.fee_label',
812 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
815 'table_name' => 'civicrm_event',
817 'bao' => 'CRM_Event_BAO_Event',
823 'is_show_location' => array(
824 'name' => 'is_show_location',
825 'type' => CRM_Utils_Type
::T_BOOLEAN
,
826 'title' => ts('show location') ,
827 'description' => 'If true, show event location.',
829 'table_name' => 'civicrm_event',
831 'bao' => 'CRM_Event_BAO_Event',
834 'type' => 'CheckBox',
837 'loc_block_id' => array(
838 'name' => 'loc_block_id',
839 'type' => CRM_Utils_Type
::T_INT
,
840 'title' => ts('Location Block ID') ,
841 'description' => 'FK to Location Block ID',
842 'table_name' => 'civicrm_event',
844 'bao' => 'CRM_Event_BAO_Event',
846 'FKClassName' => 'CRM_Core_DAO_LocBlock',
848 'default_role_id' => array(
849 'name' => 'default_role_id',
850 'type' => CRM_Utils_Type
::T_INT
,
851 'title' => ts('Default Role') ,
852 'description' => 'Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.',
854 'where' => 'civicrm_event.default_role_id',
855 'headerPattern' => '',
859 'table_name' => 'civicrm_event',
861 'bao' => 'CRM_Event_BAO_Event',
866 'pseudoconstant' => array(
867 'optionGroupName' => 'participant_role',
868 'optionEditPath' => 'civicrm/admin/options/participant_role',
871 'intro_text' => array(
872 'name' => 'intro_text',
873 'type' => CRM_Utils_Type
::T_TEXT
,
874 'title' => ts('Introductory Message') ,
875 'description' => 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
878 'table_name' => 'civicrm_event',
880 'bao' => 'CRM_Event_BAO_Event',
883 'type' => 'TextArea',
886 'footer_text' => array(
887 'name' => 'footer_text',
888 'type' => CRM_Utils_Type
::T_TEXT
,
889 'title' => ts('Footer Message') ,
890 'description' => 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
893 'table_name' => 'civicrm_event',
895 'bao' => 'CRM_Event_BAO_Event',
898 'type' => 'TextArea',
901 'confirm_title' => array(
902 'name' => 'confirm_title',
903 'type' => CRM_Utils_Type
::T_STRING
,
904 'title' => ts('Confirmation Title') ,
905 'description' => 'Title for Confirmation page.',
907 'size' => CRM_Utils_Type
::HUGE
,
909 'table_name' => 'civicrm_event',
911 'bao' => 'CRM_Event_BAO_Event',
917 'confirm_text' => array(
918 'name' => 'confirm_text',
919 'type' => CRM_Utils_Type
::T_TEXT
,
920 'title' => ts('Confirm Text') ,
921 'description' => 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
924 'table_name' => 'civicrm_event',
926 'bao' => 'CRM_Event_BAO_Event',
929 'type' => 'TextArea',
932 'confirm_footer_text' => array(
933 'name' => 'confirm_footer_text',
934 'type' => CRM_Utils_Type
::T_TEXT
,
935 'title' => ts('Footer Text') ,
936 'description' => 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
939 'table_name' => 'civicrm_event',
941 'bao' => 'CRM_Event_BAO_Event',
944 'type' => 'TextArea',
947 'is_email_confirm' => array(
948 'name' => 'is_email_confirm',
949 'type' => CRM_Utils_Type
::T_BOOLEAN
,
950 'title' => ts('Is confirm email') ,
951 'description' => 'If true, confirmation is automatically emailed to contact on successful registration.',
952 'table_name' => 'civicrm_event',
954 'bao' => 'CRM_Event_BAO_Event',
957 'type' => 'CheckBox',
960 'confirm_email_text' => array(
961 'name' => 'confirm_email_text',
962 'type' => CRM_Utils_Type
::T_TEXT
,
963 'title' => ts('Confirmation Email Text') ,
964 'description' => 'text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now',
967 'table_name' => 'civicrm_event',
969 'bao' => 'CRM_Event_BAO_Event',
972 'type' => 'TextArea',
975 'confirm_from_name' => array(
976 'name' => 'confirm_from_name',
977 'type' => CRM_Utils_Type
::T_STRING
,
978 'title' => ts('Confirm From Name') ,
979 'description' => 'FROM email name used for confirmation emails.',
981 'size' => CRM_Utils_Type
::HUGE
,
982 'table_name' => 'civicrm_event',
984 'bao' => 'CRM_Event_BAO_Event',
990 'confirm_from_email' => array(
991 'name' => 'confirm_from_email',
992 'type' => CRM_Utils_Type
::T_STRING
,
993 'title' => ts('Confirm From Email') ,
994 'description' => 'FROM email address used for confirmation emails.',
996 'size' => CRM_Utils_Type
::HUGE
,
997 'table_name' => 'civicrm_event',
999 'bao' => 'CRM_Event_BAO_Event',
1005 'cc_confirm' => array(
1006 'name' => 'cc_confirm',
1007 'type' => CRM_Utils_Type
::T_STRING
,
1008 'title' => ts('Cc Confirm') ,
1009 'description' => 'comma-separated list of email addresses to cc each time a confirmation is sent',
1011 'size' => CRM_Utils_Type
::HUGE
,
1012 'table_name' => 'civicrm_event',
1013 'entity' => 'Event',
1014 'bao' => 'CRM_Event_BAO_Event',
1020 'bcc_confirm' => array(
1021 'name' => 'bcc_confirm',
1022 'type' => CRM_Utils_Type
::T_STRING
,
1023 'title' => ts('Bcc Confirm') ,
1024 'description' => 'comma-separated list of email addresses to bcc each time a confirmation is sent',
1026 'size' => CRM_Utils_Type
::HUGE
,
1027 'table_name' => 'civicrm_event',
1028 'entity' => 'Event',
1029 'bao' => 'CRM_Event_BAO_Event',
1035 'default_fee_id' => array(
1036 'name' => 'default_fee_id',
1037 'type' => CRM_Utils_Type
::T_INT
,
1038 'title' => ts('Default Fee ID') ,
1039 'description' => 'FK to civicrm_option_value.',
1040 'table_name' => 'civicrm_event',
1041 'entity' => 'Event',
1042 'bao' => 'CRM_Event_BAO_Event',
1045 'default_discount_fee_id' => array(
1046 'name' => 'default_discount_fee_id',
1047 'type' => CRM_Utils_Type
::T_INT
,
1048 'title' => ts('Default Discount Fee ID') ,
1049 'description' => 'FK to civicrm_option_value.',
1050 'table_name' => 'civicrm_event',
1051 'entity' => 'Event',
1052 'bao' => 'CRM_Event_BAO_Event',
1055 'thankyou_title' => array(
1056 'name' => 'thankyou_title',
1057 'type' => CRM_Utils_Type
::T_STRING
,
1058 'title' => ts('ThankYou Title') ,
1059 'description' => 'Title for ThankYou page.',
1061 'size' => CRM_Utils_Type
::HUGE
,
1062 'default' => 'NULL',
1063 'table_name' => 'civicrm_event',
1064 'entity' => 'Event',
1065 'bao' => 'CRM_Event_BAO_Event',
1071 'thankyou_text' => array(
1072 'name' => 'thankyou_text',
1073 'type' => CRM_Utils_Type
::T_TEXT
,
1074 'title' => ts('ThankYou Text') ,
1075 'description' => 'ThankYou Text.',
1078 'table_name' => 'civicrm_event',
1079 'entity' => 'Event',
1080 'bao' => 'CRM_Event_BAO_Event',
1083 'type' => 'TextArea',
1086 'thankyou_footer_text' => array(
1087 'name' => 'thankyou_footer_text',
1088 'type' => CRM_Utils_Type
::T_TEXT
,
1089 'title' => ts('Footer Text') ,
1090 'description' => 'Footer message.',
1093 'table_name' => 'civicrm_event',
1094 'entity' => 'Event',
1095 'bao' => 'CRM_Event_BAO_Event',
1098 'type' => 'TextArea',
1101 'is_pay_later' => array(
1102 'name' => 'is_pay_later',
1103 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1104 'title' => ts('Pay Later Allowed') ,
1105 'description' => 'if true - allows the user to send payment directly to the org later',
1106 'table_name' => 'civicrm_event',
1107 'entity' => 'Event',
1108 'bao' => 'CRM_Event_BAO_Event',
1111 'type' => 'CheckBox',
1114 'pay_later_text' => array(
1115 'name' => 'pay_later_text',
1116 'type' => CRM_Utils_Type
::T_TEXT
,
1117 'title' => ts('Pay Later Text') ,
1118 'description' => 'The text displayed to the user in the main form',
1119 'table_name' => 'civicrm_event',
1120 'entity' => 'Event',
1121 'bao' => 'CRM_Event_BAO_Event',
1127 'pay_later_receipt' => array(
1128 'name' => 'pay_later_receipt',
1129 'type' => CRM_Utils_Type
::T_TEXT
,
1130 'title' => ts('Pay Later Receipt Text') ,
1131 'description' => 'The receipt sent to the user instead of the normal receipt text',
1132 'table_name' => 'civicrm_event',
1133 'entity' => 'Event',
1134 'bao' => 'CRM_Event_BAO_Event',
1140 'is_partial_payment' => array(
1141 'name' => 'is_partial_payment',
1142 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1143 'title' => ts('Partial Payments Enabled') ,
1144 'description' => 'is partial payment enabled for this event',
1145 'table_name' => 'civicrm_event',
1146 'entity' => 'Event',
1147 'bao' => 'CRM_Event_BAO_Event',
1150 'type' => 'CheckBox',
1153 'initial_amount_label' => array(
1154 'name' => 'initial_amount_label',
1155 'type' => CRM_Utils_Type
::T_STRING
,
1156 'title' => ts('Initial Amount Label') ,
1157 'description' => 'Initial amount label for partial payment',
1159 'size' => CRM_Utils_Type
::HUGE
,
1160 'table_name' => 'civicrm_event',
1161 'entity' => 'Event',
1162 'bao' => 'CRM_Event_BAO_Event',
1168 'initial_amount_help_text' => array(
1169 'name' => 'initial_amount_help_text',
1170 'type' => CRM_Utils_Type
::T_TEXT
,
1171 'title' => ts('Initial Amount Help Text') ,
1172 'description' => 'Initial amount help text for partial payment',
1173 'table_name' => 'civicrm_event',
1174 'entity' => 'Event',
1175 'bao' => 'CRM_Event_BAO_Event',
1181 'min_initial_amount' => array(
1182 'name' => 'min_initial_amount',
1183 'type' => CRM_Utils_Type
::T_MONEY
,
1184 'title' => ts('Minimum Initial Amount') ,
1185 'description' => 'Minimum initial amount for partial payment',
1186 'precision' => array(
1190 'table_name' => 'civicrm_event',
1191 'entity' => 'Event',
1192 'bao' => 'CRM_Event_BAO_Event',
1198 'is_multiple_registrations' => array(
1199 'name' => 'is_multiple_registrations',
1200 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1201 'title' => ts('Allow Multiple Registrations') ,
1202 'description' => 'if true - allows the user to register multiple participants for event',
1203 'table_name' => 'civicrm_event',
1204 'entity' => 'Event',
1205 'bao' => 'CRM_Event_BAO_Event',
1208 'type' => 'CheckBox',
1211 'max_additional_participants' => array(
1212 'name' => 'max_additional_participants',
1213 'type' => CRM_Utils_Type
::T_INT
,
1214 'title' => ts('Maximum number of additional participants per registration') ,
1215 'description' => 'Maximum number of additional participants that can be registered on a single booking',
1216 'table_name' => 'civicrm_event',
1217 'entity' => 'Event',
1218 'bao' => 'CRM_Event_BAO_Event',
1221 'allow_same_participant_emails' => array(
1222 'name' => 'allow_same_participant_emails',
1223 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1224 'title' => ts('Does Event allow multiple registrations from same email address?') ,
1225 'description' => 'if true - allows the user to register multiple registrations from same email address.',
1226 'table_name' => 'civicrm_event',
1227 'entity' => 'Event',
1228 'bao' => 'CRM_Event_BAO_Event',
1231 'type' => 'CheckBox',
1234 'has_waitlist' => array(
1235 'name' => 'has_waitlist',
1236 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1237 'title' => ts('Waitlist Enabled') ,
1238 'description' => 'Whether the event has waitlist support.',
1239 'table_name' => 'civicrm_event',
1240 'entity' => 'Event',
1241 'bao' => 'CRM_Event_BAO_Event',
1244 'type' => 'CheckBox',
1247 'requires_approval' => array(
1248 'name' => 'requires_approval',
1249 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1250 'title' => ts('Requires Approval') ,
1251 'description' => 'Whether participants require approval before they can finish registering.',
1252 'table_name' => 'civicrm_event',
1253 'entity' => 'Event',
1254 'bao' => 'CRM_Event_BAO_Event',
1257 'type' => 'CheckBox',
1260 'expiration_time' => array(
1261 'name' => 'expiration_time',
1262 'type' => CRM_Utils_Type
::T_INT
,
1263 'title' => ts('Expiration Time') ,
1264 'description' => 'Expire pending but unconfirmed registrations after this many hours.',
1265 'table_name' => 'civicrm_event',
1266 'entity' => 'Event',
1267 'bao' => 'CRM_Event_BAO_Event',
1273 'allow_selfcancelxfer' => array(
1274 'name' => 'allow_selfcancelxfer',
1275 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1276 'title' => ts('Allow Self-service Cancellation or Transfer') ,
1277 'description' => 'Allow self service cancellation or transfer for event?',
1278 'table_name' => 'civicrm_event',
1279 'entity' => 'Event',
1280 'bao' => 'CRM_Event_BAO_Event',
1283 'type' => 'CheckBox',
1286 'selfcancelxfer_time' => array(
1287 'name' => 'selfcancelxfer_time',
1288 'type' => CRM_Utils_Type
::T_INT
,
1289 'title' => ts('Self-service Cancellation or Transfer Time') ,
1290 'description' => 'Number of hours prior to event start date to allow self-service cancellation or transfer.',
1291 'table_name' => 'civicrm_event',
1292 'entity' => 'Event',
1293 'bao' => 'CRM_Event_BAO_Event',
1299 'waitlist_text' => array(
1300 'name' => 'waitlist_text',
1301 'type' => CRM_Utils_Type
::T_TEXT
,
1302 'title' => ts('Waitlist Text') ,
1303 'description' => 'Text to display when the event is full, but participants can signup for a waitlist.',
1306 'table_name' => 'civicrm_event',
1307 'entity' => 'Event',
1308 'bao' => 'CRM_Event_BAO_Event',
1311 'type' => 'TextArea',
1314 'approval_req_text' => array(
1315 'name' => 'approval_req_text',
1316 'type' => CRM_Utils_Type
::T_TEXT
,
1317 'title' => ts('Approval Req Text') ,
1318 'description' => 'Text to display when the approval is required to complete registration for an event.',
1321 'table_name' => 'civicrm_event',
1322 'entity' => 'Event',
1323 'bao' => 'CRM_Event_BAO_Event',
1326 'type' => 'TextArea',
1329 'is_template' => array(
1330 'name' => 'is_template',
1331 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1332 'title' => ts('Is an Event Template') ,
1333 'description' => 'whether the event has template',
1335 'table_name' => 'civicrm_event',
1336 'entity' => 'Event',
1337 'bao' => 'CRM_Event_BAO_Event',
1340 'type' => 'CheckBox',
1343 'template_title' => array(
1344 'name' => 'template_title',
1345 'type' => CRM_Utils_Type
::T_STRING
,
1346 'title' => ts('Event Template Title') ,
1347 'description' => 'Event Template Title',
1349 'size' => CRM_Utils_Type
::HUGE
,
1351 'where' => 'civicrm_event.template_title',
1352 'headerPattern' => '/(template.)?title$/i',
1353 'dataPattern' => '',
1355 'table_name' => 'civicrm_event',
1356 'entity' => 'Event',
1357 'bao' => 'CRM_Event_BAO_Event',
1363 'created_id' => array(
1364 'name' => 'created_id',
1365 'type' => CRM_Utils_Type
::T_INT
,
1366 'title' => ts('Created By Contact ID') ,
1367 'description' => 'FK to civicrm_contact, who created this event',
1368 'table_name' => 'civicrm_event',
1369 'entity' => 'Event',
1370 'bao' => 'CRM_Event_BAO_Event',
1372 'FKClassName' => 'CRM_Contact_DAO_Contact',
1374 'created_date' => array(
1375 'name' => 'created_date',
1376 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
1377 'title' => ts('Event Created Date') ,
1378 'description' => 'Date and time that event was created.',
1379 'table_name' => 'civicrm_event',
1380 'entity' => 'Event',
1381 'bao' => 'CRM_Event_BAO_Event',
1384 'currency' => array(
1385 'name' => 'currency',
1386 'type' => CRM_Utils_Type
::T_STRING
,
1387 'title' => ts('Currency') ,
1388 'description' => '3 character string, value from config setting or input via user.',
1390 'size' => CRM_Utils_Type
::FOUR
,
1392 'where' => 'civicrm_event.currency',
1393 'headerPattern' => '/cur(rency)?/i',
1394 'dataPattern' => '/^[A-Z]{3}$/i',
1396 'table_name' => 'civicrm_event',
1397 'entity' => 'Event',
1398 'bao' => 'CRM_Event_BAO_Event',
1403 'pseudoconstant' => array(
1404 'table' => 'civicrm_currency',
1405 'keyColumn' => 'name',
1406 'labelColumn' => 'full_name',
1407 'nameColumn' => 'name',
1410 'campaign_id' => array(
1411 'name' => 'campaign_id',
1412 'type' => CRM_Utils_Type
::T_INT
,
1413 'title' => ts('Campaign') ,
1414 'description' => 'The campaign for which this event has been created.',
1415 'table_name' => 'civicrm_event',
1416 'entity' => 'Event',
1417 'bao' => 'CRM_Event_BAO_Event',
1419 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1421 'type' => 'EntityRef',
1423 'pseudoconstant' => array(
1424 'table' => 'civicrm_campaign',
1425 'keyColumn' => 'id',
1426 'labelColumn' => 'title',
1429 'is_share' => array(
1430 'name' => 'is_share',
1431 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1432 'title' => ts('Is shared through social media') ,
1433 'description' => 'Can people share the event through social media?',
1435 'table_name' => 'civicrm_event',
1436 'entity' => 'Event',
1437 'bao' => 'CRM_Event_BAO_Event',
1440 'type' => 'CheckBox',
1443 'is_confirm_enabled' => array(
1444 'name' => 'is_confirm_enabled',
1445 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1446 'title' => ts('Is the booking confirmation screen enabled?') ,
1447 'description' => 'If false, the event booking confirmation screen gets skipped',
1449 'table_name' => 'civicrm_event',
1450 'entity' => 'Event',
1451 'bao' => 'CRM_Event_BAO_Event',
1454 'type' => 'CheckBox',
1457 'parent_event_id' => array(
1458 'name' => 'parent_event_id',
1459 'type' => CRM_Utils_Type
::T_INT
,
1460 'title' => ts('Parent Event ID') ,
1461 'description' => 'Implicit FK to civicrm_event: parent event',
1462 'default' => 'NULL',
1463 'table_name' => 'civicrm_event',
1464 'entity' => 'Event',
1465 'bao' => 'CRM_Event_BAO_Event',
1468 'type' => 'EntityRef',
1471 'slot_label_id' => array(
1472 'name' => 'slot_label_id',
1473 'type' => CRM_Utils_Type
::T_INT
,
1474 'title' => ts('Subevent Slot Label ID') ,
1475 'description' => 'Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.',
1476 'default' => 'NULL',
1477 'table_name' => 'civicrm_event',
1478 'entity' => 'Event',
1479 'bao' => 'CRM_Event_BAO_Event',
1485 'dedupe_rule_group_id' => array(
1486 'name' => 'dedupe_rule_group_id',
1487 'type' => CRM_Utils_Type
::T_INT
,
1488 'title' => ts('Dedupe Rule') ,
1489 'description' => 'Rule to use when matching registrations for this event',
1490 'default' => 'NULL',
1491 'table_name' => 'civicrm_event',
1492 'entity' => 'Event',
1493 'bao' => 'CRM_Event_BAO_Event',
1495 'FKClassName' => 'CRM_Dedupe_DAO_RuleGroup',
1499 'pseudoconstant' => array(
1500 'table' => 'civicrm_dedupe_rule_group',
1501 'keyColumn' => 'id',
1502 'labelColumn' => 'title',
1503 'nameColumn' => 'name',
1506 'is_billing_required' => array(
1507 'name' => 'is_billing_required',
1508 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1509 'title' => ts('Is billing block required') ,
1510 'description' => 'if true than billing block is required this event',
1511 'table_name' => 'civicrm_event',
1512 'entity' => 'Event',
1513 'bao' => 'CRM_Event_BAO_Event',
1516 'type' => 'CheckBox',
1520 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1522 return Civi
::$statics[__CLASS__
]['fields'];
1525 * Return a mapping from field-name to the corresponding key (as used in fields()).
1528 * Array(string $name => string $uniqueName).
1530 static function &fieldKeys() {
1531 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1532 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1534 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1537 * Returns the names of this table
1541 static function getTableName() {
1542 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1545 * Returns if this table needs to be logged
1553 * Returns the list of fields that can be imported
1555 * @param bool $prefix
1559 static function &import($prefix = false) {
1560 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'event', $prefix, array());
1564 * Returns the list of fields that can be exported
1566 * @param bool $prefix
1570 static function &export($prefix = false) {
1571 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'event', $prefix, array());
1575 * Returns the list of indices
1577 public static function indices($localize = TRUE) {
1579 'index_event_type_id' => array(
1580 'name' => 'index_event_type_id',
1582 0 => 'event_type_id',
1584 'localizable' => false,
1585 'sig' => 'civicrm_event::0::event_type_id',
1587 'index_participant_listing_id' => array(
1588 'name' => 'index_participant_listing_id',
1590 0 => 'participant_listing_id',
1592 'localizable' => false,
1593 'sig' => 'civicrm_event::0::participant_listing_id',
1595 'index_parent_event_id' => array(
1596 'name' => 'index_parent_event_id',
1598 0 => 'parent_event_id',
1600 'localizable' => false,
1601 'sig' => 'civicrm_event::0::parent_event_id',
1604 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;