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 instance to hold the field values
49 static $_fields = null;
51 * static instance to hold the FK relationships
55 static $_links = null;
57 * static value to see if we should log any modifications to
58 * this table in the civicrm_log table
70 * Event Title (e.g. Fall Fundraiser Dinner)
76 * 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.
82 * Full description of event. Text and html allowed. Displayed on built-in Event Information screens.
88 * Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.
92 public $event_type_id;
94 * Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.
98 public $participant_listing_id;
100 * Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.
106 * Date and time that event starts.
112 * Date and time that event ends. May be NULL if no defined end date/time
118 * If true, include registration link on Event Info page.
122 public $is_online_registration;
124 * Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.
128 public $registration_link_text;
130 * Date and time that online registration starts.
134 public $registration_start_date;
136 * Date and time that online registration ends.
140 public $registration_end_date;
142 * 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.
146 public $max_participants;
148 * 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.
152 public $event_full_text;
154 * If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.
160 * Financial type assigned to paid event registrations for this event. Required if is_monetary is true.
164 public $financial_type_id;
166 * Payment Processors configured for this Event (if is_monetary is true)
170 public $payment_processor;
172 * Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?
178 * Is this Event enabled or disabled/cancelled?
189 * If true, show event location.
193 public $is_show_location;
195 * FK to Location Block ID
199 public $loc_block_id;
201 * Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.
205 public $default_role_id;
207 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
213 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
219 * Title for Confirmation page.
223 public $confirm_title;
225 * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
229 public $confirm_text;
231 * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
235 public $confirm_footer_text;
237 * If true, confirmation is automatically emailed to contact on successful registration.
241 public $is_email_confirm;
243 * text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now
247 public $confirm_email_text;
249 * FROM email name used for confirmation emails.
253 public $confirm_from_name;
255 * FROM email address used for confirmation emails.
259 public $confirm_from_email;
261 * comma-separated list of email addresses to cc each time a confirmation is sent
267 * comma-separated list of email addresses to bcc each time a confirmation is sent
273 * FK to civicrm_option_value.
277 public $default_fee_id;
279 * FK to civicrm_option_value.
283 public $default_discount_fee_id;
285 * Title for ThankYou page.
289 public $thankyou_title;
295 public $thankyou_text;
301 public $thankyou_footer_text;
303 * if true - allows the user to send payment directly to the org later
307 public $is_pay_later;
309 * The text displayed to the user in the main form
313 public $pay_later_text;
315 * The receipt sent to the user instead of the normal receipt text
319 public $pay_later_receipt;
321 * is partial payment enabled for this event
325 public $is_partial_payment;
327 * Initial amount label for partial payment
331 public $initial_amount_label;
333 * Initial amount help text for partial payment
337 public $initial_amount_help_text;
339 * Minimum initial amount for partial payment
343 public $min_initial_amount;
345 * if true - allows the user to register multiple participants for event
349 public $is_multiple_registrations;
351 * Maximum number of additional participants that can be registered on a single booking
355 public $max_additional_participants;
357 * if true - allows the user to register multiple registrations from same email address.
361 public $allow_same_participant_emails;
363 * Whether the event has waitlist support.
367 public $has_waitlist;
369 * Whether participants require approval before they can finish registering.
373 public $requires_approval;
375 * Expire pending but unconfirmed registrations after this many hours.
379 public $expiration_time;
381 * Allow self service cancellation or transfer for event?
385 public $allow_selfcancelxfer;
387 * Number of hours prior to event start date to allow self-service cancellation or transfer.
391 public $selfcancelxfer_time;
393 * Text to display when the event is full, but participants can signup for a waitlist.
397 public $waitlist_text;
399 * Text to display when the approval is required to complete registration for an event.
403 public $approval_req_text;
405 * whether the event has template
411 * Event Template Title
415 public $template_title;
417 * FK to civicrm_contact, who created this event
423 * Date and time that event was created.
427 public $created_date;
429 * 3 character string, value from config setting or input via user.
435 * The campaign for which this event has been created.
441 * Can people share the event through social media?
447 * If false, the event booking confirmation screen gets skipped
451 public $is_confirm_enabled;
453 * Implicit FK to civicrm_event: parent event
457 public $parent_event_id;
459 * Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.
463 public $slot_label_id;
465 * Rule to use when matching registrations for this event
469 public $dedupe_rule_group_id;
471 * if true than billing block is required this event
475 public $is_billing_required;
479 * @return civicrm_event
481 function __construct() {
482 $this->__table
= 'civicrm_event';
483 parent
::__construct();
486 * Returns foreign keys and entity references
489 * [CRM_Core_Reference_Interface]
491 static function getReferenceColumns() {
492 if (!self
::$_links) {
493 self
::$_links = static ::createReferenceColumns(__CLASS__
);
494 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'loc_block_id', 'civicrm_loc_block', 'id');
495 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'created_id', 'civicrm_contact', 'id');
496 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
497 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'dedupe_rule_group_id', 'civicrm_dedupe_rule_group', 'id');
499 return self
::$_links;
502 * Returns all the column names of this table
506 static function &fields() {
507 if (!(self
::$_fields)) {
508 self
::$_fields = array(
511 'type' => CRM_Utils_Type
::T_INT
,
512 'title' => ts('Event ID') ,
513 'description' => 'Event',
516 'event_title' => array(
518 'type' => CRM_Utils_Type
::T_STRING
,
519 'title' => ts('Event Title') ,
520 'description' => 'Event Title (e.g. Fall Fundraiser Dinner)',
522 'size' => CRM_Utils_Type
::HUGE
,
524 'where' => 'civicrm_event.title',
525 'headerPattern' => '/(event.)?title$/i',
534 'type' => CRM_Utils_Type
::T_TEXT
,
535 'title' => ts('Event Summary') ,
536 '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.',
540 'type' => 'TextArea',
543 'event_description' => array(
544 'name' => 'description',
545 'type' => CRM_Utils_Type
::T_TEXT
,
546 'title' => ts('Event Description') ,
547 'description' => 'Full description of event. Text and html allowed. Displayed on built-in Event Information screens.',
551 'type' => 'TextArea',
554 'event_type_id' => array(
555 'name' => 'event_type_id',
556 'type' => CRM_Utils_Type
::T_INT
,
557 'title' => ts('Event Type') ,
558 'description' => 'Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.',
562 'pseudoconstant' => array(
563 'optionGroupName' => 'event_type',
564 'optionEditPath' => 'civicrm/admin/options/event_type',
567 'participant_listing_id' => array(
568 'name' => 'participant_listing_id',
569 'type' => CRM_Utils_Type
::T_INT
,
570 'title' => ts('Participant Listing') ,
571 'description' => 'Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.',
575 'pseudoconstant' => array(
576 'optionGroupName' => 'participant_listing',
577 'optionEditPath' => 'civicrm/admin/options/participant_listing',
580 'is_public' => array(
581 'name' => 'is_public',
582 'type' => CRM_Utils_Type
::T_BOOLEAN
,
583 'title' => ts('Is Event Public') ,
584 'description' => 'Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.',
587 'type' => 'CheckBox',
590 'event_start_date' => array(
591 'name' => 'start_date',
592 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
593 'title' => ts('Event Start Date') ,
594 'description' => 'Date and time that event starts.',
596 'where' => 'civicrm_event.start_date',
597 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
601 'type' => 'Select Date',
604 'event_end_date' => array(
605 'name' => 'end_date',
606 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
607 'title' => ts('Event End Date') ,
608 'description' => 'Date and time that event ends. May be NULL if no defined end date/time',
610 'where' => 'civicrm_event.end_date',
611 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
615 'type' => 'Select Date',
618 'is_online_registration' => array(
619 'name' => 'is_online_registration',
620 'type' => CRM_Utils_Type
::T_BOOLEAN
,
621 'title' => ts('Is Online Registration') ,
622 'description' => 'If true, include registration link on Event Info page.',
624 'type' => 'CheckBox',
627 'registration_link_text' => array(
628 'name' => 'registration_link_text',
629 'type' => CRM_Utils_Type
::T_STRING
,
630 'title' => ts('Event Registration Link Text') ,
631 'description' => 'Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.',
633 'size' => CRM_Utils_Type
::HUGE
,
638 'registration_start_date' => array(
639 'name' => 'registration_start_date',
640 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
641 'title' => ts('Registration Start Date') ,
642 'description' => 'Date and time that online registration starts.',
644 'type' => 'Select Date',
647 'registration_end_date' => array(
648 'name' => 'registration_end_date',
649 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
650 'title' => ts('Registration End Date') ,
651 'description' => 'Date and time that online registration ends.',
653 'type' => 'Select Date',
656 'max_participants' => array(
657 'name' => 'max_participants',
658 'type' => CRM_Utils_Type
::T_INT
,
659 'title' => ts('Max Participants') ,
660 '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.',
666 'event_full_text' => array(
667 'name' => 'event_full_text',
668 'type' => CRM_Utils_Type
::T_TEXT
,
669 'title' => ts('Event Information') ,
670 '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.',
674 'type' => 'TextArea',
677 'is_monetary' => array(
678 'name' => 'is_monetary',
679 'type' => CRM_Utils_Type
::T_BOOLEAN
,
680 'title' => ts('Is this a PAID event?') ,
681 'description' => 'If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.',
683 'type' => 'CheckBox',
686 'financial_type_id' => array(
687 'name' => 'financial_type_id',
688 'type' => CRM_Utils_Type
::T_INT
,
689 'title' => ts('Financial Type') ,
690 'description' => 'Financial type assigned to paid event registrations for this event. Required if is_monetary is true.',
695 'pseudoconstant' => array(
696 'table' => 'civicrm_financial_type',
698 'labelColumn' => 'name',
701 'payment_processor' => array(
702 'name' => 'payment_processor',
703 'type' => CRM_Utils_Type
::T_STRING
,
704 'title' => ts('Payment Processor') ,
705 'description' => 'Payment Processors configured for this Event (if is_monetary is true)',
707 'size' => CRM_Utils_Type
::HUGE
,
711 'pseudoconstant' => array(
712 'table' => 'civicrm_payment_processor',
714 'labelColumn' => 'name',
719 'type' => CRM_Utils_Type
::T_BOOLEAN
,
720 'title' => ts('Map Enabled') ,
721 'description' => 'Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?',
723 'type' => 'CheckBox',
726 'is_active' => array(
727 'name' => 'is_active',
728 'type' => CRM_Utils_Type
::T_BOOLEAN
,
729 'title' => ts('Is Active') ,
730 'description' => 'Is this Event enabled or disabled/cancelled?',
732 'type' => 'CheckBox',
735 'fee_label' => array(
736 'name' => 'fee_label',
737 'type' => CRM_Utils_Type
::T_STRING
,
738 'title' => ts('Fee Label') ,
740 'size' => CRM_Utils_Type
::HUGE
,
742 'where' => 'civicrm_event.fee_label',
743 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
750 'is_show_location' => array(
751 'name' => 'is_show_location',
752 'type' => CRM_Utils_Type
::T_BOOLEAN
,
753 'title' => ts('show location') ,
754 'description' => 'If true, show event location.',
757 'type' => 'CheckBox',
760 'loc_block_id' => array(
761 'name' => 'loc_block_id',
762 'type' => CRM_Utils_Type
::T_INT
,
763 'title' => ts('Location Block ID') ,
764 'description' => 'FK to Location Block ID',
765 'FKClassName' => 'CRM_Core_DAO_LocBlock',
767 'default_role_id' => array(
768 'name' => 'default_role_id',
769 'type' => CRM_Utils_Type
::T_INT
,
770 'title' => ts('Default Role') ,
771 'description' => 'Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.',
773 'where' => 'civicrm_event.default_role_id',
774 'headerPattern' => '',
781 'pseudoconstant' => array(
782 'optionGroupName' => 'participant_role',
783 'optionEditPath' => 'civicrm/admin/options/participant_role',
786 'intro_text' => array(
787 'name' => 'intro_text',
788 'type' => CRM_Utils_Type
::T_TEXT
,
789 'title' => ts('Introductory Message') ,
790 'description' => 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
794 'type' => 'TextArea',
797 'footer_text' => array(
798 'name' => 'footer_text',
799 'type' => CRM_Utils_Type
::T_TEXT
,
800 'title' => ts('Footer Message') ,
801 'description' => 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
805 'type' => 'TextArea',
808 'confirm_title' => array(
809 'name' => 'confirm_title',
810 'type' => CRM_Utils_Type
::T_STRING
,
811 'title' => ts('Confirmation Title') ,
812 'description' => 'Title for Confirmation page.',
814 'size' => CRM_Utils_Type
::HUGE
,
820 'confirm_text' => array(
821 'name' => 'confirm_text',
822 'type' => CRM_Utils_Type
::T_TEXT
,
823 'title' => ts('Confirm Text') ,
824 'description' => 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
828 'type' => 'TextArea',
831 'confirm_footer_text' => array(
832 'name' => 'confirm_footer_text',
833 'type' => CRM_Utils_Type
::T_TEXT
,
834 'title' => ts('Footer Text') ,
835 'description' => 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
839 'type' => 'TextArea',
842 'is_email_confirm' => array(
843 'name' => 'is_email_confirm',
844 'type' => CRM_Utils_Type
::T_BOOLEAN
,
845 'title' => ts('Is confirm email') ,
846 'description' => 'If true, confirmation is automatically emailed to contact on successful registration.',
848 'type' => 'CheckBox',
851 'confirm_email_text' => array(
852 'name' => 'confirm_email_text',
853 'type' => CRM_Utils_Type
::T_TEXT
,
854 'title' => ts('Confirmation Email Text') ,
855 'description' => 'text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now',
859 'type' => 'TextArea',
862 'confirm_from_name' => array(
863 'name' => 'confirm_from_name',
864 'type' => CRM_Utils_Type
::T_STRING
,
865 'title' => ts('Confirm From Name') ,
866 'description' => 'FROM email name used for confirmation emails.',
868 'size' => CRM_Utils_Type
::HUGE
,
873 'confirm_from_email' => array(
874 'name' => 'confirm_from_email',
875 'type' => CRM_Utils_Type
::T_STRING
,
876 'title' => ts('Confirm From Email') ,
877 'description' => 'FROM email address used for confirmation emails.',
879 'size' => CRM_Utils_Type
::HUGE
,
884 'cc_confirm' => array(
885 'name' => 'cc_confirm',
886 'type' => CRM_Utils_Type
::T_STRING
,
887 'title' => ts('Cc Confirm') ,
888 'description' => 'comma-separated list of email addresses to cc each time a confirmation is sent',
890 'size' => CRM_Utils_Type
::HUGE
,
895 'bcc_confirm' => array(
896 'name' => 'bcc_confirm',
897 'type' => CRM_Utils_Type
::T_STRING
,
898 'title' => ts('Bcc Confirm') ,
899 'description' => 'comma-separated list of email addresses to bcc each time a confirmation is sent',
901 'size' => CRM_Utils_Type
::HUGE
,
906 'default_fee_id' => array(
907 'name' => 'default_fee_id',
908 'type' => CRM_Utils_Type
::T_INT
,
909 'title' => ts('Default Fee ID') ,
910 'description' => 'FK to civicrm_option_value.',
912 'default_discount_fee_id' => array(
913 'name' => 'default_discount_fee_id',
914 'type' => CRM_Utils_Type
::T_INT
,
915 'title' => ts('Default Discount Fee ID') ,
916 'description' => 'FK to civicrm_option_value.',
918 'thankyou_title' => array(
919 'name' => 'thankyou_title',
920 'type' => CRM_Utils_Type
::T_STRING
,
921 'title' => ts('ThankYou Title') ,
922 'description' => 'Title for ThankYou page.',
924 'size' => CRM_Utils_Type
::HUGE
,
930 'thankyou_text' => array(
931 'name' => 'thankyou_text',
932 'type' => CRM_Utils_Type
::T_TEXT
,
933 'title' => ts('ThankYou Text') ,
934 'description' => 'ThankYou Text.',
938 'type' => 'TextArea',
941 'thankyou_footer_text' => array(
942 'name' => 'thankyou_footer_text',
943 'type' => CRM_Utils_Type
::T_TEXT
,
944 'title' => ts('Footer Text') ,
945 'description' => 'Footer message.',
949 'type' => 'TextArea',
952 'is_pay_later' => array(
953 'name' => 'is_pay_later',
954 'type' => CRM_Utils_Type
::T_BOOLEAN
,
955 'title' => ts('Pay Later Allowed') ,
956 'description' => 'if true - allows the user to send payment directly to the org later',
958 'type' => 'CheckBox',
961 'pay_later_text' => array(
962 'name' => 'pay_later_text',
963 'type' => CRM_Utils_Type
::T_TEXT
,
964 'title' => ts('Pay Later Text') ,
965 'description' => 'The text displayed to the user in the main form',
970 'pay_later_receipt' => array(
971 'name' => 'pay_later_receipt',
972 'type' => CRM_Utils_Type
::T_TEXT
,
973 'title' => ts('Pay Later Receipt Text') ,
974 'description' => 'The receipt sent to the user instead of the normal receipt text',
979 'is_partial_payment' => array(
980 'name' => 'is_partial_payment',
981 'type' => CRM_Utils_Type
::T_BOOLEAN
,
982 'title' => ts('Partial Payments Enabled') ,
983 'description' => 'is partial payment enabled for this event',
985 'type' => 'CheckBox',
988 'initial_amount_label' => array(
989 'name' => 'initial_amount_label',
990 'type' => CRM_Utils_Type
::T_STRING
,
991 'title' => ts('Initial Amount Label') ,
992 'description' => 'Initial amount label for partial payment',
994 'size' => CRM_Utils_Type
::HUGE
,
999 'initial_amount_help_text' => array(
1000 'name' => 'initial_amount_help_text',
1001 'type' => CRM_Utils_Type
::T_TEXT
,
1002 'title' => ts('Initial Amount Help Text') ,
1003 'description' => 'Initial amount help text for partial payment',
1008 'min_initial_amount' => array(
1009 'name' => 'min_initial_amount',
1010 'type' => CRM_Utils_Type
::T_MONEY
,
1011 'title' => ts('Minimum Initial Amount') ,
1012 'description' => 'Minimum initial amount for partial payment',
1013 'precision' => array(
1021 'is_multiple_registrations' => array(
1022 'name' => 'is_multiple_registrations',
1023 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1024 'title' => ts('Allow Multiple Registrations') ,
1025 'description' => 'if true - allows the user to register multiple participants for event',
1027 'type' => 'CheckBox',
1030 'max_additional_participants' => array(
1031 'name' => 'max_additional_participants',
1032 'type' => CRM_Utils_Type
::T_INT
,
1033 'title' => ts('Maximum number of additional participants per registration') ,
1034 'description' => 'Maximum number of additional participants that can be registered on a single booking',
1036 'allow_same_participant_emails' => array(
1037 'name' => 'allow_same_participant_emails',
1038 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1039 'title' => ts('Does Event allow multiple registrations from same email address?') ,
1040 'description' => 'if true - allows the user to register multiple registrations from same email address.',
1042 'type' => 'CheckBox',
1045 'has_waitlist' => array(
1046 'name' => 'has_waitlist',
1047 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1048 'title' => ts('Waitlist Enabled') ,
1049 'description' => 'Whether the event has waitlist support.',
1051 'type' => 'CheckBox',
1054 'requires_approval' => array(
1055 'name' => 'requires_approval',
1056 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1057 'title' => ts('Requires Approval') ,
1058 'description' => 'Whether participants require approval before they can finish registering.',
1060 'type' => 'CheckBox',
1063 'expiration_time' => array(
1064 'name' => 'expiration_time',
1065 'type' => CRM_Utils_Type
::T_INT
,
1066 'title' => ts('Expiration Time') ,
1067 'description' => 'Expire pending but unconfirmed registrations after this many hours.',
1072 'allow_selfcancelxfer' => array(
1073 'name' => 'allow_selfcancelxfer',
1074 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1075 'title' => ts('Allow Self-service Cancellation or Transfer') ,
1076 'description' => 'Allow self service cancellation or transfer for event?',
1078 'type' => 'CheckBox',
1081 'selfcancelxfer_time' => array(
1082 'name' => 'selfcancelxfer_time',
1083 'type' => CRM_Utils_Type
::T_INT
,
1084 'title' => ts('Self-service Cancellation or Transfer Time') ,
1085 'description' => 'Number of hours prior to event start date to allow self-service cancellation or transfer.',
1090 'waitlist_text' => array(
1091 'name' => 'waitlist_text',
1092 'type' => CRM_Utils_Type
::T_TEXT
,
1093 'title' => ts('Waitlist Text') ,
1094 'description' => 'Text to display when the event is full, but participants can signup for a waitlist.',
1098 'type' => 'TextArea',
1101 'approval_req_text' => array(
1102 'name' => 'approval_req_text',
1103 'type' => CRM_Utils_Type
::T_TEXT
,
1104 'title' => ts('Approval Req Text') ,
1105 'description' => 'Text to display when the approval is required to complete registration for an event.',
1109 'type' => 'TextArea',
1112 'is_template' => array(
1113 'name' => 'is_template',
1114 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1115 'title' => ts('Is an Event Template') ,
1116 'description' => 'whether the event has template',
1119 'type' => 'CheckBox',
1122 'template_title' => array(
1123 'name' => 'template_title',
1124 'type' => CRM_Utils_Type
::T_STRING
,
1125 'title' => ts('Event Template Title') ,
1126 'description' => 'Event Template Title',
1128 'size' => CRM_Utils_Type
::HUGE
,
1130 'where' => 'civicrm_event.template_title',
1131 'headerPattern' => '/(template.)?title$/i',
1132 'dataPattern' => '',
1138 'created_id' => array(
1139 'name' => 'created_id',
1140 'type' => CRM_Utils_Type
::T_INT
,
1141 'title' => ts('Created By Contact ID') ,
1142 'description' => 'FK to civicrm_contact, who created this event',
1143 'FKClassName' => 'CRM_Contact_DAO_Contact',
1145 'created_date' => array(
1146 'name' => 'created_date',
1147 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
1148 'title' => ts('Event Created Date') ,
1149 'description' => 'Date and time that event was created.',
1151 'currency' => array(
1152 'name' => 'currency',
1153 'type' => CRM_Utils_Type
::T_STRING
,
1154 'title' => ts('Currency') ,
1155 'description' => '3 character string, value from config setting or input via user.',
1157 'size' => CRM_Utils_Type
::FOUR
,
1159 'where' => 'civicrm_event.currency',
1160 'headerPattern' => '/cur(rency)?/i',
1161 'dataPattern' => '/^[A-Z]{3}$/i',
1166 'pseudoconstant' => array(
1167 'table' => 'civicrm_currency',
1168 'keyColumn' => 'name',
1169 'labelColumn' => 'full_name',
1170 'nameColumn' => 'name',
1173 'campaign_id' => array(
1174 'name' => 'campaign_id',
1175 'type' => CRM_Utils_Type
::T_INT
,
1176 'title' => ts('Campaign') ,
1177 'description' => 'The campaign for which this event has been created.',
1178 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1180 'type' => 'EntityRef',
1182 'pseudoconstant' => array(
1183 'table' => 'civicrm_campaign',
1184 'keyColumn' => 'id',
1185 'labelColumn' => 'title',
1188 'is_share' => array(
1189 'name' => 'is_share',
1190 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1191 'title' => ts('Is shared through social media') ,
1192 'description' => 'Can people share the event through social media?',
1195 'type' => 'CheckBox',
1198 'is_confirm_enabled' => array(
1199 'name' => 'is_confirm_enabled',
1200 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1201 'title' => ts('Is the booking confirmation screen enabled?') ,
1202 'description' => 'If false, the event booking confirmation screen gets skipped',
1205 'type' => 'CheckBox',
1208 'parent_event_id' => array(
1209 'name' => 'parent_event_id',
1210 'type' => CRM_Utils_Type
::T_INT
,
1211 'title' => ts('Parent Event ID') ,
1212 'description' => 'Implicit FK to civicrm_event: parent event',
1213 'default' => 'NULL',
1215 'type' => 'EntityRef',
1218 'slot_label_id' => array(
1219 'name' => 'slot_label_id',
1220 'type' => CRM_Utils_Type
::T_INT
,
1221 'title' => ts('Subevent Slot Label ID') ,
1222 'description' => 'Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.',
1223 'default' => 'NULL',
1228 'dedupe_rule_group_id' => array(
1229 'name' => 'dedupe_rule_group_id',
1230 'type' => CRM_Utils_Type
::T_INT
,
1231 'title' => ts('Dedupe Rule') ,
1232 'description' => 'Rule to use when matching registrations for this event',
1233 'default' => 'NULL',
1234 'FKClassName' => 'CRM_Dedupe_DAO_RuleGroup',
1238 'pseudoconstant' => array(
1239 'table' => 'civicrm_dedupe_rule_group',
1240 'keyColumn' => 'id',
1241 'labelColumn' => 'title',
1242 'nameColumn' => 'name',
1245 'is_billing_required' => array(
1246 'name' => 'is_billing_required',
1247 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1248 'title' => ts('Is billing block required') ,
1249 'description' => 'if true than billing block is required this event',
1251 'type' => 'CheckBox',
1256 return self
::$_fields;
1259 * Return a mapping from field-name to the corresponding key (as used in fields()).
1262 * Array(string $name => string $uniqueName).
1264 static function &fieldKeys() {
1265 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1266 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1268 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1271 * Returns the names of this table
1275 static function getTableName() {
1276 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1279 * Returns if this table needs to be logged
1287 * Returns the list of fields that can be imported
1289 * @param bool $prefix
1293 static function &import($prefix = false) {
1294 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'event', $prefix, array());
1298 * Returns the list of fields that can be exported
1300 * @param bool $prefix
1304 static function &export($prefix = false) {
1305 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'event', $prefix, array());