3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
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-2016
31 * Generated from xml/schema/CRM/Event/Event.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:852ff9c0ec07c4eff96a484e1b44f781)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Event_DAO_Event
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_event';
45 * static value to see if we should log any modifications to
46 * this table in the civicrm_log table
58 * Event Title (e.g. Fall Fundraiser Dinner)
64 * 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.
70 * Full description of event. Text and html allowed. Displayed on built-in Event Information screens.
76 * Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.
80 public $event_type_id;
82 * Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.
86 public $participant_listing_id;
88 * Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.
94 * Date and time that event starts.
100 * Date and time that event ends. May be NULL if no defined end date/time
106 * If true, include registration link on Event Info page.
110 public $is_online_registration;
112 * Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.
116 public $registration_link_text;
118 * Date and time that online registration starts.
122 public $registration_start_date;
124 * Date and time that online registration ends.
128 public $registration_end_date;
130 * 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.
134 public $max_participants;
136 * 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.
140 public $event_full_text;
142 * If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.
148 * Financial type assigned to paid event registrations for this event. Required if is_monetary is true.
152 public $financial_type_id;
154 * Payment Processors configured for this Event (if is_monetary is true)
158 public $payment_processor;
160 * Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?
166 * Is this Event enabled or disabled/cancelled?
177 * If true, show event location.
181 public $is_show_location;
183 * FK to Location Block ID
187 public $loc_block_id;
189 * Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.
193 public $default_role_id;
195 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
201 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
207 * Title for Confirmation page.
211 public $confirm_title;
213 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
217 public $confirm_text;
219 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
223 public $confirm_footer_text;
225 * If true, confirmation is automatically emailed to contact on successful registration.
229 public $is_email_confirm;
231 * text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now
235 public $confirm_email_text;
237 * FROM email name used for confirmation emails.
241 public $confirm_from_name;
243 * FROM email address used for confirmation emails.
247 public $confirm_from_email;
249 * comma-separated list of email addresses to cc each time a confirmation is sent
255 * comma-separated list of email addresses to bcc each time a confirmation is sent
261 * FK to civicrm_option_value.
265 public $default_fee_id;
267 * FK to civicrm_option_value.
271 public $default_discount_fee_id;
273 * Title for ThankYou page.
277 public $thankyou_title;
283 public $thankyou_text;
289 public $thankyou_footer_text;
291 * if true - allows the user to send payment directly to the org later
295 public $is_pay_later;
297 * The text displayed to the user in the main form
301 public $pay_later_text;
303 * The receipt sent to the user instead of the normal receipt text
307 public $pay_later_receipt;
309 * is partial payment enabled for this event
313 public $is_partial_payment;
315 * Initial amount label for partial payment
319 public $initial_amount_label;
321 * Initial amount help text for partial payment
325 public $initial_amount_help_text;
327 * Minimum initial amount for partial payment
331 public $min_initial_amount;
333 * if true - allows the user to register multiple participants for event
337 public $is_multiple_registrations;
339 * Maximum number of additional participants that can be registered on a single booking
343 public $max_additional_participants;
345 * if true - allows the user to register multiple registrations from same email address.
349 public $allow_same_participant_emails;
351 * Whether the event has waitlist support.
355 public $has_waitlist;
357 * Whether participants require approval before they can finish registering.
361 public $requires_approval;
363 * Expire pending but unconfirmed registrations after this many hours.
367 public $expiration_time;
369 * Allow self service cancellation or transfer for event?
373 public $allow_selfcancelxfer;
375 * Number of hours prior to event start date to allow self-service cancellation or transfer.
379 public $selfcancelxfer_time;
381 * Text to display when the event is full, but participants can signup for a waitlist.
385 public $waitlist_text;
387 * Text to display when the approval is required to complete registration for an event.
391 public $approval_req_text;
393 * whether the event has template
399 * Event Template Title
403 public $template_title;
405 * FK to civicrm_contact, who created this event
411 * Date and time that event was created.
415 public $created_date;
417 * 3 character string, value from config setting or input via user.
423 * The campaign for which this event has been created.
429 * Can people share the event through social media?
435 * If false, the event booking confirmation screen gets skipped
439 public $is_confirm_enabled;
441 * Implicit FK to civicrm_event: parent event
445 public $parent_event_id;
447 * Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.
451 public $slot_label_id;
453 * Rule to use when matching registrations for this event
457 public $dedupe_rule_group_id;
459 * if true than billing block is required this event
463 public $is_billing_required;
467 * @return civicrm_event
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',
505 'event_title' => array(
507 'type' => CRM_Utils_Type
::T_STRING
,
508 'title' => ts('Event Title') ,
509 'description' => 'Event Title (e.g. Fall Fundraiser Dinner)',
511 'size' => CRM_Utils_Type
::HUGE
,
513 'where' => 'civicrm_event.title',
514 'headerPattern' => '/(event.)?title$/i',
523 'type' => CRM_Utils_Type
::T_TEXT
,
524 'title' => ts('Event Summary') ,
525 '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.',
529 'type' => 'TextArea',
532 'event_description' => array(
533 'name' => 'description',
534 'type' => CRM_Utils_Type
::T_TEXT
,
535 'title' => ts('Event Description') ,
536 'description' => 'Full description of event. Text and html allowed. Displayed on built-in Event Information screens.',
540 'type' => 'TextArea',
543 'event_type_id' => array(
544 'name' => 'event_type_id',
545 'type' => CRM_Utils_Type
::T_INT
,
546 'title' => ts('Event Type') ,
547 'description' => 'Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.',
551 'pseudoconstant' => array(
552 'optionGroupName' => 'event_type',
553 'optionEditPath' => 'civicrm/admin/options/event_type',
556 'participant_listing_id' => array(
557 'name' => 'participant_listing_id',
558 'type' => CRM_Utils_Type
::T_INT
,
559 'title' => ts('Participant Listing') ,
560 'description' => 'Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.',
564 'pseudoconstant' => array(
565 'optionGroupName' => 'participant_listing',
566 'optionEditPath' => 'civicrm/admin/options/participant_listing',
569 'is_public' => array(
570 'name' => 'is_public',
571 'type' => CRM_Utils_Type
::T_BOOLEAN
,
572 'title' => ts('Is Event Public') ,
573 'description' => 'Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.',
576 'type' => 'CheckBox',
579 'event_start_date' => array(
580 'name' => 'start_date',
581 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
582 'title' => ts('Event Start Date') ,
583 'description' => 'Date and time that event starts.',
585 'where' => 'civicrm_event.start_date',
586 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
590 'type' => 'Select Date',
593 'event_end_date' => array(
594 'name' => 'end_date',
595 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
596 'title' => ts('Event End Date') ,
597 'description' => 'Date and time that event ends. May be NULL if no defined end date/time',
599 'where' => 'civicrm_event.end_date',
600 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
604 'type' => 'Select Date',
607 'is_online_registration' => array(
608 'name' => 'is_online_registration',
609 'type' => CRM_Utils_Type
::T_BOOLEAN
,
610 'title' => ts('Is Online Registration') ,
611 'description' => 'If true, include registration link on Event Info page.',
613 'type' => 'CheckBox',
616 'registration_link_text' => array(
617 'name' => 'registration_link_text',
618 'type' => CRM_Utils_Type
::T_STRING
,
619 'title' => ts('Event Registration Link Text') ,
620 'description' => 'Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.',
622 'size' => CRM_Utils_Type
::HUGE
,
627 'registration_start_date' => array(
628 'name' => 'registration_start_date',
629 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
630 'title' => ts('Registration Start Date') ,
631 'description' => 'Date and time that online registration starts.',
633 'type' => 'Select Date',
636 'registration_end_date' => array(
637 'name' => 'registration_end_date',
638 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
639 'title' => ts('Registration End Date') ,
640 'description' => 'Date and time that online registration ends.',
642 'type' => 'Select Date',
645 'max_participants' => array(
646 'name' => 'max_participants',
647 'type' => CRM_Utils_Type
::T_INT
,
648 'title' => ts('Max Participants') ,
649 '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.',
655 'event_full_text' => array(
656 'name' => 'event_full_text',
657 'type' => CRM_Utils_Type
::T_TEXT
,
658 'title' => ts('Event Information') ,
659 '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.',
663 'type' => 'TextArea',
666 'is_monetary' => array(
667 'name' => 'is_monetary',
668 'type' => CRM_Utils_Type
::T_BOOLEAN
,
669 'title' => ts('Is this a PAID event?') ,
670 'description' => 'If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.',
672 'type' => 'CheckBox',
675 'financial_type_id' => array(
676 'name' => 'financial_type_id',
677 'type' => CRM_Utils_Type
::T_INT
,
678 'title' => ts('Financial Type') ,
679 'description' => 'Financial type assigned to paid event registrations for this event. Required if is_monetary is true.',
684 'pseudoconstant' => array(
685 'table' => 'civicrm_financial_type',
687 'labelColumn' => 'name',
690 'payment_processor' => array(
691 'name' => 'payment_processor',
692 'type' => CRM_Utils_Type
::T_STRING
,
693 'title' => ts('Payment Processor') ,
694 'description' => 'Payment Processors configured for this Event (if is_monetary is true)',
696 'size' => CRM_Utils_Type
::HUGE
,
700 'pseudoconstant' => array(
701 'table' => 'civicrm_payment_processor',
703 'labelColumn' => 'name',
708 'type' => CRM_Utils_Type
::T_BOOLEAN
,
709 'title' => ts('Map Enabled') ,
710 'description' => 'Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?',
712 'type' => 'CheckBox',
715 'is_active' => array(
716 'name' => 'is_active',
717 'type' => CRM_Utils_Type
::T_BOOLEAN
,
718 'title' => ts('Is Active') ,
719 'description' => 'Is this Event enabled or disabled/cancelled?',
721 'type' => 'CheckBox',
724 'fee_label' => array(
725 'name' => 'fee_label',
726 'type' => CRM_Utils_Type
::T_STRING
,
727 'title' => ts('Fee Label') ,
729 'size' => CRM_Utils_Type
::HUGE
,
731 'where' => 'civicrm_event.fee_label',
732 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
739 'is_show_location' => array(
740 'name' => 'is_show_location',
741 'type' => CRM_Utils_Type
::T_BOOLEAN
,
742 'title' => ts('show location') ,
743 'description' => 'If true, show event location.',
746 'type' => 'CheckBox',
749 'loc_block_id' => array(
750 'name' => 'loc_block_id',
751 'type' => CRM_Utils_Type
::T_INT
,
752 'title' => ts('Location Block ID') ,
753 'description' => 'FK to Location Block ID',
754 'FKClassName' => 'CRM_Core_DAO_LocBlock',
756 'default_role_id' => array(
757 'name' => 'default_role_id',
758 'type' => CRM_Utils_Type
::T_INT
,
759 'title' => ts('Default Role') ,
760 'description' => 'Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.',
762 'where' => 'civicrm_event.default_role_id',
763 'headerPattern' => '',
770 'pseudoconstant' => array(
771 'optionGroupName' => 'participant_role',
772 'optionEditPath' => 'civicrm/admin/options/participant_role',
775 'intro_text' => array(
776 'name' => 'intro_text',
777 'type' => CRM_Utils_Type
::T_TEXT
,
778 'title' => ts('Introductory Message') ,
779 'description' => 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
783 'type' => 'TextArea',
786 'footer_text' => array(
787 'name' => 'footer_text',
788 'type' => CRM_Utils_Type
::T_TEXT
,
789 'title' => ts('Footer Message') ,
790 'description' => 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
794 'type' => 'TextArea',
797 'confirm_title' => array(
798 'name' => 'confirm_title',
799 'type' => CRM_Utils_Type
::T_STRING
,
800 'title' => ts('Confirmation Title') ,
801 'description' => 'Title for Confirmation page.',
803 'size' => CRM_Utils_Type
::HUGE
,
809 'confirm_text' => array(
810 'name' => 'confirm_text',
811 'type' => CRM_Utils_Type
::T_TEXT
,
812 'title' => ts('Confirm Text') ,
813 'description' => 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
817 'type' => 'TextArea',
820 'confirm_footer_text' => array(
821 'name' => 'confirm_footer_text',
822 'type' => CRM_Utils_Type
::T_TEXT
,
823 'title' => ts('Footer Text') ,
824 'description' => 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
828 'type' => 'TextArea',
831 'is_email_confirm' => array(
832 'name' => 'is_email_confirm',
833 'type' => CRM_Utils_Type
::T_BOOLEAN
,
834 'title' => ts('Is confirm email') ,
835 'description' => 'If true, confirmation is automatically emailed to contact on successful registration.',
837 'type' => 'CheckBox',
840 'confirm_email_text' => array(
841 'name' => 'confirm_email_text',
842 'type' => CRM_Utils_Type
::T_TEXT
,
843 'title' => ts('Confirmation Email Text') ,
844 'description' => 'text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now',
848 'type' => 'TextArea',
851 'confirm_from_name' => array(
852 'name' => 'confirm_from_name',
853 'type' => CRM_Utils_Type
::T_STRING
,
854 'title' => ts('Confirm From Name') ,
855 'description' => 'FROM email name used for confirmation emails.',
857 'size' => CRM_Utils_Type
::HUGE
,
862 'confirm_from_email' => array(
863 'name' => 'confirm_from_email',
864 'type' => CRM_Utils_Type
::T_STRING
,
865 'title' => ts('Confirm From Email') ,
866 'description' => 'FROM email address used for confirmation emails.',
868 'size' => CRM_Utils_Type
::HUGE
,
873 'cc_confirm' => array(
874 'name' => 'cc_confirm',
875 'type' => CRM_Utils_Type
::T_STRING
,
876 'title' => ts('Cc Confirm') ,
877 'description' => 'comma-separated list of email addresses to cc each time a confirmation is sent',
879 'size' => CRM_Utils_Type
::HUGE
,
884 'bcc_confirm' => array(
885 'name' => 'bcc_confirm',
886 'type' => CRM_Utils_Type
::T_STRING
,
887 'title' => ts('Bcc Confirm') ,
888 'description' => 'comma-separated list of email addresses to bcc each time a confirmation is sent',
890 'size' => CRM_Utils_Type
::HUGE
,
895 'default_fee_id' => array(
896 'name' => 'default_fee_id',
897 'type' => CRM_Utils_Type
::T_INT
,
898 'title' => ts('Default Fee ID') ,
899 'description' => 'FK to civicrm_option_value.',
901 'default_discount_fee_id' => array(
902 'name' => 'default_discount_fee_id',
903 'type' => CRM_Utils_Type
::T_INT
,
904 'title' => ts('Default Discount Fee ID') ,
905 'description' => 'FK to civicrm_option_value.',
907 'thankyou_title' => array(
908 'name' => 'thankyou_title',
909 'type' => CRM_Utils_Type
::T_STRING
,
910 'title' => ts('ThankYou Title') ,
911 'description' => 'Title for ThankYou page.',
913 'size' => CRM_Utils_Type
::HUGE
,
919 'thankyou_text' => array(
920 'name' => 'thankyou_text',
921 'type' => CRM_Utils_Type
::T_TEXT
,
922 'title' => ts('ThankYou Text') ,
923 'description' => 'ThankYou Text.',
927 'type' => 'TextArea',
930 'thankyou_footer_text' => array(
931 'name' => 'thankyou_footer_text',
932 'type' => CRM_Utils_Type
::T_TEXT
,
933 'title' => ts('Footer Text') ,
934 'description' => 'Footer message.',
938 'type' => 'TextArea',
941 'is_pay_later' => array(
942 'name' => 'is_pay_later',
943 'type' => CRM_Utils_Type
::T_BOOLEAN
,
944 'title' => ts('Pay Later Allowed') ,
945 'description' => 'if true - allows the user to send payment directly to the org later',
947 'type' => 'CheckBox',
950 'pay_later_text' => array(
951 'name' => 'pay_later_text',
952 'type' => CRM_Utils_Type
::T_TEXT
,
953 'title' => ts('Pay Later Text') ,
954 'description' => 'The text displayed to the user in the main form',
959 'pay_later_receipt' => array(
960 'name' => 'pay_later_receipt',
961 'type' => CRM_Utils_Type
::T_TEXT
,
962 'title' => ts('Pay Later Receipt Text') ,
963 'description' => 'The receipt sent to the user instead of the normal receipt text',
968 'is_partial_payment' => array(
969 'name' => 'is_partial_payment',
970 'type' => CRM_Utils_Type
::T_BOOLEAN
,
971 'title' => ts('Partial Payments Enabled') ,
972 'description' => 'is partial payment enabled for this event',
974 'type' => 'CheckBox',
977 'initial_amount_label' => array(
978 'name' => 'initial_amount_label',
979 'type' => CRM_Utils_Type
::T_STRING
,
980 'title' => ts('Initial Amount Label') ,
981 'description' => 'Initial amount label for partial payment',
983 'size' => CRM_Utils_Type
::HUGE
,
988 'initial_amount_help_text' => array(
989 'name' => 'initial_amount_help_text',
990 'type' => CRM_Utils_Type
::T_TEXT
,
991 'title' => ts('Initial Amount Help Text') ,
992 'description' => 'Initial amount help text for partial payment',
997 'min_initial_amount' => array(
998 'name' => 'min_initial_amount',
999 'type' => CRM_Utils_Type
::T_MONEY
,
1000 'title' => ts('Minimum Initial Amount') ,
1001 'description' => 'Minimum initial amount for partial payment',
1002 'precision' => array(
1010 'is_multiple_registrations' => array(
1011 'name' => 'is_multiple_registrations',
1012 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1013 'title' => ts('Allow Multiple Registrations') ,
1014 'description' => 'if true - allows the user to register multiple participants for event',
1016 'type' => 'CheckBox',
1019 'max_additional_participants' => array(
1020 'name' => 'max_additional_participants',
1021 'type' => CRM_Utils_Type
::T_INT
,
1022 'title' => ts('Maximum number of additional participants per registration') ,
1023 'description' => 'Maximum number of additional participants that can be registered on a single booking',
1025 'allow_same_participant_emails' => array(
1026 'name' => 'allow_same_participant_emails',
1027 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1028 'title' => ts('Does Event allow multiple registrations from same email address?') ,
1029 'description' => 'if true - allows the user to register multiple registrations from same email address.',
1031 'type' => 'CheckBox',
1034 'has_waitlist' => array(
1035 'name' => 'has_waitlist',
1036 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1037 'title' => ts('Waitlist Enabled') ,
1038 'description' => 'Whether the event has waitlist support.',
1040 'type' => 'CheckBox',
1043 'requires_approval' => array(
1044 'name' => 'requires_approval',
1045 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1046 'title' => ts('Requires Approval') ,
1047 'description' => 'Whether participants require approval before they can finish registering.',
1049 'type' => 'CheckBox',
1052 'expiration_time' => array(
1053 'name' => 'expiration_time',
1054 'type' => CRM_Utils_Type
::T_INT
,
1055 'title' => ts('Expiration Time') ,
1056 'description' => 'Expire pending but unconfirmed registrations after this many hours.',
1061 'allow_selfcancelxfer' => array(
1062 'name' => 'allow_selfcancelxfer',
1063 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1064 'title' => ts('Allow Self-service Cancellation or Transfer') ,
1065 'description' => 'Allow self service cancellation or transfer for event?',
1067 'type' => 'CheckBox',
1070 'selfcancelxfer_time' => array(
1071 'name' => 'selfcancelxfer_time',
1072 'type' => CRM_Utils_Type
::T_INT
,
1073 'title' => ts('Self-service Cancellation or Transfer Time') ,
1074 'description' => 'Number of hours prior to event start date to allow self-service cancellation or transfer.',
1079 'waitlist_text' => array(
1080 'name' => 'waitlist_text',
1081 'type' => CRM_Utils_Type
::T_TEXT
,
1082 'title' => ts('Waitlist Text') ,
1083 'description' => 'Text to display when the event is full, but participants can signup for a waitlist.',
1087 'type' => 'TextArea',
1090 'approval_req_text' => array(
1091 'name' => 'approval_req_text',
1092 'type' => CRM_Utils_Type
::T_TEXT
,
1093 'title' => ts('Approval Req Text') ,
1094 'description' => 'Text to display when the approval is required to complete registration for an event.',
1098 'type' => 'TextArea',
1101 'is_template' => array(
1102 'name' => 'is_template',
1103 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1104 'title' => ts('Is an Event Template') ,
1105 'description' => 'whether the event has template',
1108 'type' => 'CheckBox',
1111 'template_title' => array(
1112 'name' => 'template_title',
1113 'type' => CRM_Utils_Type
::T_STRING
,
1114 'title' => ts('Event Template Title') ,
1115 'description' => 'Event Template Title',
1117 'size' => CRM_Utils_Type
::HUGE
,
1119 'where' => 'civicrm_event.template_title',
1120 'headerPattern' => '/(template.)?title$/i',
1121 'dataPattern' => '',
1127 'created_id' => array(
1128 'name' => 'created_id',
1129 'type' => CRM_Utils_Type
::T_INT
,
1130 'title' => ts('Created By Contact ID') ,
1131 'description' => 'FK to civicrm_contact, who created this event',
1132 'FKClassName' => 'CRM_Contact_DAO_Contact',
1134 'created_date' => array(
1135 'name' => 'created_date',
1136 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
1137 'title' => ts('Event Created Date') ,
1138 'description' => 'Date and time that event was created.',
1140 'currency' => array(
1141 'name' => 'currency',
1142 'type' => CRM_Utils_Type
::T_STRING
,
1143 'title' => ts('Currency') ,
1144 'description' => '3 character string, value from config setting or input via user.',
1146 'size' => CRM_Utils_Type
::FOUR
,
1148 'where' => 'civicrm_event.currency',
1149 'headerPattern' => '/cur(rency)?/i',
1150 'dataPattern' => '/^[A-Z]{3}$/i',
1155 'pseudoconstant' => array(
1156 'table' => 'civicrm_currency',
1157 'keyColumn' => 'name',
1158 'labelColumn' => 'full_name',
1159 'nameColumn' => 'name',
1162 'campaign_id' => array(
1163 'name' => 'campaign_id',
1164 'type' => CRM_Utils_Type
::T_INT
,
1165 'title' => ts('Campaign') ,
1166 'description' => 'The campaign for which this event has been created.',
1167 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1169 'type' => 'EntityRef',
1171 'pseudoconstant' => array(
1172 'table' => 'civicrm_campaign',
1173 'keyColumn' => 'id',
1174 'labelColumn' => 'title',
1177 'is_share' => array(
1178 'name' => 'is_share',
1179 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1180 'title' => ts('Is shared through social media') ,
1181 'description' => 'Can people share the event through social media?',
1184 'type' => 'CheckBox',
1187 'is_confirm_enabled' => array(
1188 'name' => 'is_confirm_enabled',
1189 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1190 'title' => ts('Is the booking confirmation screen enabled?') ,
1191 'description' => 'If false, the event booking confirmation screen gets skipped',
1194 'type' => 'CheckBox',
1197 'parent_event_id' => array(
1198 'name' => 'parent_event_id',
1199 'type' => CRM_Utils_Type
::T_INT
,
1200 'title' => ts('Parent Event ID') ,
1201 'description' => 'Implicit FK to civicrm_event: parent event',
1202 'default' => 'NULL',
1204 'type' => 'EntityRef',
1207 'slot_label_id' => array(
1208 'name' => 'slot_label_id',
1209 'type' => CRM_Utils_Type
::T_INT
,
1210 'title' => ts('Subevent Slot Label ID') ,
1211 'description' => 'Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.',
1212 'default' => 'NULL',
1217 'dedupe_rule_group_id' => array(
1218 'name' => 'dedupe_rule_group_id',
1219 'type' => CRM_Utils_Type
::T_INT
,
1220 'title' => ts('Dedupe Rule') ,
1221 'description' => 'Rule to use when matching registrations for this event',
1222 'default' => 'NULL',
1223 'FKClassName' => 'CRM_Dedupe_DAO_RuleGroup',
1227 'pseudoconstant' => array(
1228 'table' => 'civicrm_dedupe_rule_group',
1229 'keyColumn' => 'id',
1230 'labelColumn' => 'title',
1231 'nameColumn' => 'name',
1234 'is_billing_required' => array(
1235 'name' => 'is_billing_required',
1236 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1237 'title' => ts('Is billing block required') ,
1238 'description' => 'if true than billing block is required this event',
1240 'type' => 'CheckBox',
1244 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1246 return Civi
::$statics[__CLASS__
]['fields'];
1249 * Return a mapping from field-name to the corresponding key (as used in fields()).
1252 * Array(string $name => string $uniqueName).
1254 static function &fieldKeys() {
1255 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1256 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1258 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1261 * Returns the names of this table
1265 static function getTableName() {
1266 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1269 * Returns if this table needs to be logged
1277 * Returns the list of fields that can be imported
1279 * @param bool $prefix
1283 static function &import($prefix = false) {
1284 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'event', $prefix, array());
1288 * Returns the list of fields that can be exported
1290 * @param bool $prefix
1294 static function &export($prefix = false) {
1295 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'event', $prefix, array());