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:014eddf6b4d26ee14495d25e73ed6b64)
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',
508 'event_title' => array(
510 'type' => CRM_Utils_Type
::T_STRING
,
511 'title' => ts('Event Title') ,
512 'description' => 'Event Title (e.g. Fall Fundraiser Dinner)',
514 'size' => CRM_Utils_Type
::HUGE
,
516 'where' => 'civicrm_event.title',
517 'headerPattern' => '/(event.)?title$/i',
520 'table_name' => 'civicrm_event',
522 'bao' => 'CRM_Event_BAO_Event',
529 'type' => CRM_Utils_Type
::T_TEXT
,
530 'title' => ts('Event Summary') ,
531 '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.',
534 'table_name' => 'civicrm_event',
536 'bao' => 'CRM_Event_BAO_Event',
538 'type' => 'TextArea',
541 'event_description' => array(
542 'name' => 'description',
543 'type' => CRM_Utils_Type
::T_TEXT
,
544 'title' => ts('Event Description') ,
545 'description' => 'Full description of event. Text and html allowed. Displayed on built-in Event Information screens.',
548 'table_name' => 'civicrm_event',
550 'bao' => 'CRM_Event_BAO_Event',
552 'type' => 'TextArea',
555 'event_type_id' => array(
556 'name' => 'event_type_id',
557 'type' => CRM_Utils_Type
::T_INT
,
558 'title' => ts('Event Type') ,
559 'description' => 'Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.',
560 'table_name' => 'civicrm_event',
562 'bao' => 'CRM_Event_BAO_Event',
566 'pseudoconstant' => array(
567 'optionGroupName' => 'event_type',
568 'optionEditPath' => 'civicrm/admin/options/event_type',
571 'participant_listing_id' => array(
572 'name' => 'participant_listing_id',
573 'type' => CRM_Utils_Type
::T_INT
,
574 'title' => ts('Participant Listing') ,
575 'description' => 'Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.',
576 'table_name' => 'civicrm_event',
578 'bao' => 'CRM_Event_BAO_Event',
582 'pseudoconstant' => array(
583 'optionGroupName' => 'participant_listing',
584 'optionEditPath' => 'civicrm/admin/options/participant_listing',
587 'is_public' => array(
588 'name' => 'is_public',
589 'type' => CRM_Utils_Type
::T_BOOLEAN
,
590 'title' => ts('Is Event Public') ,
591 'description' => 'Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.',
593 'table_name' => 'civicrm_event',
595 'bao' => 'CRM_Event_BAO_Event',
597 'type' => 'CheckBox',
600 'event_start_date' => array(
601 'name' => 'start_date',
602 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
603 'title' => ts('Event Start Date') ,
604 'description' => 'Date and time that event starts.',
606 'where' => 'civicrm_event.start_date',
607 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
610 'table_name' => 'civicrm_event',
612 'bao' => 'CRM_Event_BAO_Event',
614 'type' => 'Select Date',
617 'event_end_date' => array(
618 'name' => 'end_date',
619 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
620 'title' => ts('Event End Date') ,
621 'description' => 'Date and time that event ends. May be NULL if no defined end date/time',
623 'where' => 'civicrm_event.end_date',
624 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
627 'table_name' => 'civicrm_event',
629 'bao' => 'CRM_Event_BAO_Event',
631 'type' => 'Select Date',
634 'is_online_registration' => array(
635 'name' => 'is_online_registration',
636 'type' => CRM_Utils_Type
::T_BOOLEAN
,
637 'title' => ts('Is Online Registration') ,
638 'description' => 'If true, include registration link on Event Info page.',
639 'table_name' => 'civicrm_event',
641 'bao' => 'CRM_Event_BAO_Event',
643 'type' => 'CheckBox',
646 'registration_link_text' => array(
647 'name' => 'registration_link_text',
648 'type' => CRM_Utils_Type
::T_STRING
,
649 'title' => ts('Event Registration Link Text') ,
650 'description' => 'Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.',
652 'size' => CRM_Utils_Type
::HUGE
,
653 'table_name' => 'civicrm_event',
655 'bao' => 'CRM_Event_BAO_Event',
660 'registration_start_date' => array(
661 'name' => 'registration_start_date',
662 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
663 'title' => ts('Registration Start Date') ,
664 'description' => 'Date and time that online registration starts.',
665 'table_name' => 'civicrm_event',
667 'bao' => 'CRM_Event_BAO_Event',
669 'type' => 'Select Date',
672 'registration_end_date' => array(
673 'name' => 'registration_end_date',
674 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
675 'title' => ts('Registration End Date') ,
676 'description' => 'Date and time that online registration ends.',
677 'table_name' => 'civicrm_event',
679 'bao' => 'CRM_Event_BAO_Event',
681 'type' => 'Select Date',
684 'max_participants' => array(
685 'name' => 'max_participants',
686 'type' => CRM_Utils_Type
::T_INT
,
687 'title' => ts('Max Participants') ,
688 '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.',
690 'table_name' => 'civicrm_event',
692 'bao' => 'CRM_Event_BAO_Event',
697 'event_full_text' => array(
698 'name' => 'event_full_text',
699 'type' => CRM_Utils_Type
::T_TEXT
,
700 'title' => ts('Event Information') ,
701 '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.',
704 'table_name' => 'civicrm_event',
706 'bao' => 'CRM_Event_BAO_Event',
708 'type' => 'TextArea',
711 'is_monetary' => array(
712 'name' => 'is_monetary',
713 'type' => CRM_Utils_Type
::T_BOOLEAN
,
714 'title' => ts('Is this a PAID event?') ,
715 'description' => 'If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.',
716 'table_name' => 'civicrm_event',
718 'bao' => 'CRM_Event_BAO_Event',
720 'type' => 'CheckBox',
723 'financial_type_id' => array(
724 'name' => 'financial_type_id',
725 'type' => CRM_Utils_Type
::T_INT
,
726 'title' => ts('Financial Type') ,
727 'description' => 'Financial type assigned to paid event registrations for this event. Required if is_monetary is true.',
729 'table_name' => 'civicrm_event',
731 'bao' => 'CRM_Event_BAO_Event',
735 'pseudoconstant' => array(
736 'table' => 'civicrm_financial_type',
738 'labelColumn' => 'name',
741 'payment_processor' => array(
742 'name' => 'payment_processor',
743 'type' => CRM_Utils_Type
::T_STRING
,
744 'title' => ts('Payment Processor') ,
745 'description' => 'Payment Processors configured for this Event (if is_monetary is true)',
747 'size' => CRM_Utils_Type
::HUGE
,
748 'table_name' => 'civicrm_event',
750 'bao' => 'CRM_Event_BAO_Event',
754 'pseudoconstant' => array(
755 'table' => 'civicrm_payment_processor',
757 'labelColumn' => 'name',
762 'type' => CRM_Utils_Type
::T_BOOLEAN
,
763 'title' => ts('Map Enabled') ,
764 'description' => 'Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?',
765 'table_name' => 'civicrm_event',
767 'bao' => 'CRM_Event_BAO_Event',
769 'type' => 'CheckBox',
772 'is_active' => array(
773 'name' => 'is_active',
774 'type' => CRM_Utils_Type
::T_BOOLEAN
,
775 'title' => ts('Is Active') ,
776 'description' => 'Is this Event enabled or disabled/cancelled?',
777 'table_name' => 'civicrm_event',
779 'bao' => 'CRM_Event_BAO_Event',
781 'type' => 'CheckBox',
784 'fee_label' => array(
785 'name' => 'fee_label',
786 'type' => CRM_Utils_Type
::T_STRING
,
787 'title' => ts('Fee Label') ,
789 'size' => CRM_Utils_Type
::HUGE
,
791 'where' => 'civicrm_event.fee_label',
792 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
795 'table_name' => 'civicrm_event',
797 'bao' => 'CRM_Event_BAO_Event',
802 'is_show_location' => array(
803 'name' => 'is_show_location',
804 'type' => CRM_Utils_Type
::T_BOOLEAN
,
805 'title' => ts('show location') ,
806 'description' => 'If true, show event location.',
808 'table_name' => 'civicrm_event',
810 'bao' => 'CRM_Event_BAO_Event',
812 'type' => 'CheckBox',
815 'loc_block_id' => array(
816 'name' => 'loc_block_id',
817 'type' => CRM_Utils_Type
::T_INT
,
818 'title' => ts('Location Block ID') ,
819 'description' => 'FK to Location Block ID',
820 'table_name' => 'civicrm_event',
822 'bao' => 'CRM_Event_BAO_Event',
823 'FKClassName' => 'CRM_Core_DAO_LocBlock',
825 'default_role_id' => array(
826 'name' => 'default_role_id',
827 'type' => CRM_Utils_Type
::T_INT
,
828 'title' => ts('Default Role') ,
829 'description' => 'Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.',
831 'where' => 'civicrm_event.default_role_id',
832 'headerPattern' => '',
836 'table_name' => 'civicrm_event',
838 'bao' => 'CRM_Event_BAO_Event',
842 'pseudoconstant' => array(
843 'optionGroupName' => 'participant_role',
844 'optionEditPath' => 'civicrm/admin/options/participant_role',
847 'intro_text' => array(
848 'name' => 'intro_text',
849 'type' => CRM_Utils_Type
::T_TEXT
,
850 'title' => ts('Introductory Message') ,
851 'description' => 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
854 'table_name' => 'civicrm_event',
856 'bao' => 'CRM_Event_BAO_Event',
858 'type' => 'TextArea',
861 'footer_text' => array(
862 'name' => 'footer_text',
863 'type' => CRM_Utils_Type
::T_TEXT
,
864 'title' => ts('Footer Message') ,
865 'description' => 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
868 'table_name' => 'civicrm_event',
870 'bao' => 'CRM_Event_BAO_Event',
872 'type' => 'TextArea',
875 'confirm_title' => array(
876 'name' => 'confirm_title',
877 'type' => CRM_Utils_Type
::T_STRING
,
878 'title' => ts('Confirmation Title') ,
879 'description' => 'Title for Confirmation page.',
881 'size' => CRM_Utils_Type
::HUGE
,
883 'table_name' => 'civicrm_event',
885 'bao' => 'CRM_Event_BAO_Event',
890 'confirm_text' => array(
891 'name' => 'confirm_text',
892 'type' => CRM_Utils_Type
::T_TEXT
,
893 'title' => ts('Confirm Text') ,
894 'description' => 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
897 'table_name' => 'civicrm_event',
899 'bao' => 'CRM_Event_BAO_Event',
901 'type' => 'TextArea',
904 'confirm_footer_text' => array(
905 'name' => 'confirm_footer_text',
906 'type' => CRM_Utils_Type
::T_TEXT
,
907 'title' => ts('Footer Text') ,
908 'description' => 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
911 'table_name' => 'civicrm_event',
913 'bao' => 'CRM_Event_BAO_Event',
915 'type' => 'TextArea',
918 'is_email_confirm' => array(
919 'name' => 'is_email_confirm',
920 'type' => CRM_Utils_Type
::T_BOOLEAN
,
921 'title' => ts('Is confirm email') ,
922 'description' => 'If true, confirmation is automatically emailed to contact on successful registration.',
923 'table_name' => 'civicrm_event',
925 'bao' => 'CRM_Event_BAO_Event',
927 'type' => 'CheckBox',
930 'confirm_email_text' => array(
931 'name' => 'confirm_email_text',
932 'type' => CRM_Utils_Type
::T_TEXT
,
933 'title' => ts('Confirmation Email Text') ,
934 'description' => 'text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now',
937 'table_name' => 'civicrm_event',
939 'bao' => 'CRM_Event_BAO_Event',
941 'type' => 'TextArea',
944 'confirm_from_name' => array(
945 'name' => 'confirm_from_name',
946 'type' => CRM_Utils_Type
::T_STRING
,
947 'title' => ts('Confirm From Name') ,
948 'description' => 'FROM email name used for confirmation emails.',
950 'size' => CRM_Utils_Type
::HUGE
,
951 'table_name' => 'civicrm_event',
953 'bao' => 'CRM_Event_BAO_Event',
958 'confirm_from_email' => array(
959 'name' => 'confirm_from_email',
960 'type' => CRM_Utils_Type
::T_STRING
,
961 'title' => ts('Confirm From Email') ,
962 'description' => 'FROM email address used for confirmation emails.',
964 'size' => CRM_Utils_Type
::HUGE
,
965 'table_name' => 'civicrm_event',
967 'bao' => 'CRM_Event_BAO_Event',
972 'cc_confirm' => array(
973 'name' => 'cc_confirm',
974 'type' => CRM_Utils_Type
::T_STRING
,
975 'title' => ts('Cc Confirm') ,
976 'description' => 'comma-separated list of email addresses to cc each time a confirmation is sent',
978 'size' => CRM_Utils_Type
::HUGE
,
979 'table_name' => 'civicrm_event',
981 'bao' => 'CRM_Event_BAO_Event',
986 'bcc_confirm' => array(
987 'name' => 'bcc_confirm',
988 'type' => CRM_Utils_Type
::T_STRING
,
989 'title' => ts('Bcc Confirm') ,
990 'description' => 'comma-separated list of email addresses to bcc each time a confirmation is sent',
992 'size' => CRM_Utils_Type
::HUGE
,
993 'table_name' => 'civicrm_event',
995 'bao' => 'CRM_Event_BAO_Event',
1000 'default_fee_id' => array(
1001 'name' => 'default_fee_id',
1002 'type' => CRM_Utils_Type
::T_INT
,
1003 'title' => ts('Default Fee ID') ,
1004 'description' => 'FK to civicrm_option_value.',
1005 'table_name' => 'civicrm_event',
1006 'entity' => 'Event',
1007 'bao' => 'CRM_Event_BAO_Event',
1009 'default_discount_fee_id' => array(
1010 'name' => 'default_discount_fee_id',
1011 'type' => CRM_Utils_Type
::T_INT
,
1012 'title' => ts('Default Discount Fee ID') ,
1013 'description' => 'FK to civicrm_option_value.',
1014 'table_name' => 'civicrm_event',
1015 'entity' => 'Event',
1016 'bao' => 'CRM_Event_BAO_Event',
1018 'thankyou_title' => array(
1019 'name' => 'thankyou_title',
1020 'type' => CRM_Utils_Type
::T_STRING
,
1021 'title' => ts('ThankYou Title') ,
1022 'description' => 'Title for ThankYou page.',
1024 'size' => CRM_Utils_Type
::HUGE
,
1025 'default' => 'NULL',
1026 'table_name' => 'civicrm_event',
1027 'entity' => 'Event',
1028 'bao' => 'CRM_Event_BAO_Event',
1033 'thankyou_text' => array(
1034 'name' => 'thankyou_text',
1035 'type' => CRM_Utils_Type
::T_TEXT
,
1036 'title' => ts('ThankYou Text') ,
1037 'description' => 'ThankYou Text.',
1040 'table_name' => 'civicrm_event',
1041 'entity' => 'Event',
1042 'bao' => 'CRM_Event_BAO_Event',
1044 'type' => 'TextArea',
1047 'thankyou_footer_text' => array(
1048 'name' => 'thankyou_footer_text',
1049 'type' => CRM_Utils_Type
::T_TEXT
,
1050 'title' => ts('Footer Text') ,
1051 'description' => 'Footer message.',
1054 'table_name' => 'civicrm_event',
1055 'entity' => 'Event',
1056 'bao' => 'CRM_Event_BAO_Event',
1058 'type' => 'TextArea',
1061 'is_pay_later' => array(
1062 'name' => 'is_pay_later',
1063 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1064 'title' => ts('Pay Later Allowed') ,
1065 'description' => 'if true - allows the user to send payment directly to the org later',
1066 'table_name' => 'civicrm_event',
1067 'entity' => 'Event',
1068 'bao' => 'CRM_Event_BAO_Event',
1070 'type' => 'CheckBox',
1073 'pay_later_text' => array(
1074 'name' => 'pay_later_text',
1075 'type' => CRM_Utils_Type
::T_TEXT
,
1076 'title' => ts('Pay Later Text') ,
1077 'description' => 'The text displayed to the user in the main form',
1078 'table_name' => 'civicrm_event',
1079 'entity' => 'Event',
1080 'bao' => 'CRM_Event_BAO_Event',
1085 'pay_later_receipt' => array(
1086 'name' => 'pay_later_receipt',
1087 'type' => CRM_Utils_Type
::T_TEXT
,
1088 'title' => ts('Pay Later Receipt Text') ,
1089 'description' => 'The receipt sent to the user instead of the normal receipt text',
1090 'table_name' => 'civicrm_event',
1091 'entity' => 'Event',
1092 'bao' => 'CRM_Event_BAO_Event',
1097 'is_partial_payment' => array(
1098 'name' => 'is_partial_payment',
1099 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1100 'title' => ts('Partial Payments Enabled') ,
1101 'description' => 'is partial payment enabled for this event',
1102 'table_name' => 'civicrm_event',
1103 'entity' => 'Event',
1104 'bao' => 'CRM_Event_BAO_Event',
1106 'type' => 'CheckBox',
1109 'initial_amount_label' => array(
1110 'name' => 'initial_amount_label',
1111 'type' => CRM_Utils_Type
::T_STRING
,
1112 'title' => ts('Initial Amount Label') ,
1113 'description' => 'Initial amount label for partial payment',
1115 'size' => CRM_Utils_Type
::HUGE
,
1116 'table_name' => 'civicrm_event',
1117 'entity' => 'Event',
1118 'bao' => 'CRM_Event_BAO_Event',
1123 'initial_amount_help_text' => array(
1124 'name' => 'initial_amount_help_text',
1125 'type' => CRM_Utils_Type
::T_TEXT
,
1126 'title' => ts('Initial Amount Help Text') ,
1127 'description' => 'Initial amount help text for partial payment',
1128 'table_name' => 'civicrm_event',
1129 'entity' => 'Event',
1130 'bao' => 'CRM_Event_BAO_Event',
1135 'min_initial_amount' => array(
1136 'name' => 'min_initial_amount',
1137 'type' => CRM_Utils_Type
::T_MONEY
,
1138 'title' => ts('Minimum Initial Amount') ,
1139 'description' => 'Minimum initial amount for partial payment',
1140 'precision' => array(
1144 'table_name' => 'civicrm_event',
1145 'entity' => 'Event',
1146 'bao' => 'CRM_Event_BAO_Event',
1151 'is_multiple_registrations' => array(
1152 'name' => 'is_multiple_registrations',
1153 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1154 'title' => ts('Allow Multiple Registrations') ,
1155 'description' => 'if true - allows the user to register multiple participants for event',
1156 'table_name' => 'civicrm_event',
1157 'entity' => 'Event',
1158 'bao' => 'CRM_Event_BAO_Event',
1160 'type' => 'CheckBox',
1163 'max_additional_participants' => array(
1164 'name' => 'max_additional_participants',
1165 'type' => CRM_Utils_Type
::T_INT
,
1166 'title' => ts('Maximum number of additional participants per registration') ,
1167 'description' => 'Maximum number of additional participants that can be registered on a single booking',
1168 'table_name' => 'civicrm_event',
1169 'entity' => 'Event',
1170 'bao' => 'CRM_Event_BAO_Event',
1172 'allow_same_participant_emails' => array(
1173 'name' => 'allow_same_participant_emails',
1174 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1175 'title' => ts('Does Event allow multiple registrations from same email address?') ,
1176 'description' => 'if true - allows the user to register multiple registrations from same email address.',
1177 'table_name' => 'civicrm_event',
1178 'entity' => 'Event',
1179 'bao' => 'CRM_Event_BAO_Event',
1181 'type' => 'CheckBox',
1184 'has_waitlist' => array(
1185 'name' => 'has_waitlist',
1186 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1187 'title' => ts('Waitlist Enabled') ,
1188 'description' => 'Whether the event has waitlist support.',
1189 'table_name' => 'civicrm_event',
1190 'entity' => 'Event',
1191 'bao' => 'CRM_Event_BAO_Event',
1193 'type' => 'CheckBox',
1196 'requires_approval' => array(
1197 'name' => 'requires_approval',
1198 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1199 'title' => ts('Requires Approval') ,
1200 'description' => 'Whether participants require approval before they can finish registering.',
1201 'table_name' => 'civicrm_event',
1202 'entity' => 'Event',
1203 'bao' => 'CRM_Event_BAO_Event',
1205 'type' => 'CheckBox',
1208 'expiration_time' => array(
1209 'name' => 'expiration_time',
1210 'type' => CRM_Utils_Type
::T_INT
,
1211 'title' => ts('Expiration Time') ,
1212 'description' => 'Expire pending but unconfirmed registrations after this many hours.',
1213 'table_name' => 'civicrm_event',
1214 'entity' => 'Event',
1215 'bao' => 'CRM_Event_BAO_Event',
1220 'allow_selfcancelxfer' => array(
1221 'name' => 'allow_selfcancelxfer',
1222 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1223 'title' => ts('Allow Self-service Cancellation or Transfer') ,
1224 'description' => 'Allow self service cancellation or transfer for event?',
1225 'table_name' => 'civicrm_event',
1226 'entity' => 'Event',
1227 'bao' => 'CRM_Event_BAO_Event',
1229 'type' => 'CheckBox',
1232 'selfcancelxfer_time' => array(
1233 'name' => 'selfcancelxfer_time',
1234 'type' => CRM_Utils_Type
::T_INT
,
1235 'title' => ts('Self-service Cancellation or Transfer Time') ,
1236 'description' => 'Number of hours prior to event start date to allow self-service cancellation or transfer.',
1237 'table_name' => 'civicrm_event',
1238 'entity' => 'Event',
1239 'bao' => 'CRM_Event_BAO_Event',
1244 'waitlist_text' => array(
1245 'name' => 'waitlist_text',
1246 'type' => CRM_Utils_Type
::T_TEXT
,
1247 'title' => ts('Waitlist Text') ,
1248 'description' => 'Text to display when the event is full, but participants can signup for a waitlist.',
1251 'table_name' => 'civicrm_event',
1252 'entity' => 'Event',
1253 'bao' => 'CRM_Event_BAO_Event',
1255 'type' => 'TextArea',
1258 'approval_req_text' => array(
1259 'name' => 'approval_req_text',
1260 'type' => CRM_Utils_Type
::T_TEXT
,
1261 'title' => ts('Approval Req Text') ,
1262 'description' => 'Text to display when the approval is required to complete registration for an event.',
1265 'table_name' => 'civicrm_event',
1266 'entity' => 'Event',
1267 'bao' => 'CRM_Event_BAO_Event',
1269 'type' => 'TextArea',
1272 'is_template' => array(
1273 'name' => 'is_template',
1274 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1275 'title' => ts('Is an Event Template') ,
1276 'description' => 'whether the event has template',
1278 'table_name' => 'civicrm_event',
1279 'entity' => 'Event',
1280 'bao' => 'CRM_Event_BAO_Event',
1282 'type' => 'CheckBox',
1285 'template_title' => array(
1286 'name' => 'template_title',
1287 'type' => CRM_Utils_Type
::T_STRING
,
1288 'title' => ts('Event Template Title') ,
1289 'description' => 'Event Template Title',
1291 'size' => CRM_Utils_Type
::HUGE
,
1293 'where' => 'civicrm_event.template_title',
1294 'headerPattern' => '/(template.)?title$/i',
1295 'dataPattern' => '',
1297 'table_name' => 'civicrm_event',
1298 'entity' => 'Event',
1299 'bao' => 'CRM_Event_BAO_Event',
1304 'created_id' => array(
1305 'name' => 'created_id',
1306 'type' => CRM_Utils_Type
::T_INT
,
1307 'title' => ts('Created By Contact ID') ,
1308 'description' => 'FK to civicrm_contact, who created this event',
1309 'table_name' => 'civicrm_event',
1310 'entity' => 'Event',
1311 'bao' => 'CRM_Event_BAO_Event',
1312 'FKClassName' => 'CRM_Contact_DAO_Contact',
1314 'created_date' => array(
1315 'name' => 'created_date',
1316 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
1317 'title' => ts('Event Created Date') ,
1318 'description' => 'Date and time that event was created.',
1319 'table_name' => 'civicrm_event',
1320 'entity' => 'Event',
1321 'bao' => 'CRM_Event_BAO_Event',
1323 'currency' => array(
1324 'name' => 'currency',
1325 'type' => CRM_Utils_Type
::T_STRING
,
1326 'title' => ts('Currency') ,
1327 'description' => '3 character string, value from config setting or input via user.',
1329 'size' => CRM_Utils_Type
::FOUR
,
1331 'where' => 'civicrm_event.currency',
1332 'headerPattern' => '/cur(rency)?/i',
1333 'dataPattern' => '/^[A-Z]{3}$/i',
1335 'table_name' => 'civicrm_event',
1336 'entity' => 'Event',
1337 'bao' => 'CRM_Event_BAO_Event',
1341 'pseudoconstant' => array(
1342 'table' => 'civicrm_currency',
1343 'keyColumn' => 'name',
1344 'labelColumn' => 'full_name',
1345 'nameColumn' => 'name',
1348 'campaign_id' => array(
1349 'name' => 'campaign_id',
1350 'type' => CRM_Utils_Type
::T_INT
,
1351 'title' => ts('Campaign') ,
1352 'description' => 'The campaign for which this event has been created.',
1353 'table_name' => 'civicrm_event',
1354 'entity' => 'Event',
1355 'bao' => 'CRM_Event_BAO_Event',
1356 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1358 'type' => 'EntityRef',
1360 'pseudoconstant' => array(
1361 'table' => 'civicrm_campaign',
1362 'keyColumn' => 'id',
1363 'labelColumn' => 'title',
1366 'is_share' => array(
1367 'name' => 'is_share',
1368 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1369 'title' => ts('Is shared through social media') ,
1370 'description' => 'Can people share the event through social media?',
1372 'table_name' => 'civicrm_event',
1373 'entity' => 'Event',
1374 'bao' => 'CRM_Event_BAO_Event',
1376 'type' => 'CheckBox',
1379 'is_confirm_enabled' => array(
1380 'name' => 'is_confirm_enabled',
1381 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1382 'title' => ts('Is the booking confirmation screen enabled?') ,
1383 'description' => 'If false, the event booking confirmation screen gets skipped',
1385 'table_name' => 'civicrm_event',
1386 'entity' => 'Event',
1387 'bao' => 'CRM_Event_BAO_Event',
1389 'type' => 'CheckBox',
1392 'parent_event_id' => array(
1393 'name' => 'parent_event_id',
1394 'type' => CRM_Utils_Type
::T_INT
,
1395 'title' => ts('Parent Event ID') ,
1396 'description' => 'Implicit FK to civicrm_event: parent event',
1397 'default' => 'NULL',
1398 'table_name' => 'civicrm_event',
1399 'entity' => 'Event',
1400 'bao' => 'CRM_Event_BAO_Event',
1402 'type' => 'EntityRef',
1405 'slot_label_id' => array(
1406 'name' => 'slot_label_id',
1407 'type' => CRM_Utils_Type
::T_INT
,
1408 'title' => ts('Subevent Slot Label ID') ,
1409 'description' => 'Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.',
1410 'default' => 'NULL',
1411 'table_name' => 'civicrm_event',
1412 'entity' => 'Event',
1413 'bao' => 'CRM_Event_BAO_Event',
1418 'dedupe_rule_group_id' => array(
1419 'name' => 'dedupe_rule_group_id',
1420 'type' => CRM_Utils_Type
::T_INT
,
1421 'title' => ts('Dedupe Rule') ,
1422 'description' => 'Rule to use when matching registrations for this event',
1423 'default' => 'NULL',
1424 'table_name' => 'civicrm_event',
1425 'entity' => 'Event',
1426 'bao' => 'CRM_Event_BAO_Event',
1427 'FKClassName' => 'CRM_Dedupe_DAO_RuleGroup',
1431 'pseudoconstant' => array(
1432 'table' => 'civicrm_dedupe_rule_group',
1433 'keyColumn' => 'id',
1434 'labelColumn' => 'title',
1435 'nameColumn' => 'name',
1438 'is_billing_required' => array(
1439 'name' => 'is_billing_required',
1440 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1441 'title' => ts('Is billing block required') ,
1442 'description' => 'if true than billing block is required this event',
1443 'table_name' => 'civicrm_event',
1444 'entity' => 'Event',
1445 'bao' => 'CRM_Event_BAO_Event',
1447 'type' => 'CheckBox',
1451 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1453 return Civi
::$statics[__CLASS__
]['fields'];
1456 * Return a mapping from field-name to the corresponding key (as used in fields()).
1459 * Array(string $name => string $uniqueName).
1461 static function &fieldKeys() {
1462 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1463 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1465 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1468 * Returns the names of this table
1472 static function getTableName() {
1473 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1476 * Returns if this table needs to be logged
1484 * Returns the list of fields that can be imported
1486 * @param bool $prefix
1490 static function &import($prefix = false) {
1491 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'event', $prefix, array());
1495 * Returns the list of fields that can be exported
1497 * @param bool $prefix
1501 static function &export($prefix = false) {
1502 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'event', $prefix, array());