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/Core/PreferencesDate.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:85f54758c28f13fd4ec48f1bf45a9875)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_PreferencesDate
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_preferences_date';
45 * static instance to hold the field values
49 static $_fields = null;
51 * static instance to hold the keys used in $_fields for each field.
55 static $_fieldKeys = null;
57 * static instance to hold the FK relationships
61 static $_links = null;
63 * static value to see if we should log any modifications to
64 * this table in the civicrm_log table
75 * The meta name for this date (fixed in code)
81 * Description of this date type.
87 * The start offset relative to current year
93 * The end offset relative to current year, can be negative
113 * @return civicrm_preferences_date
115 function __construct() {
116 $this->__table
= 'civicrm_preferences_date';
117 parent
::__construct();
120 * Returns all the column names of this table
124 static function &fields() {
125 if (!(self
::$_fields)) {
126 self
::$_fields = array(
129 'type' => CRM_Utils_Type
::T_INT
,
130 'title' => ts('Date Preference ID') ,
135 'type' => CRM_Utils_Type
::T_STRING
,
136 'title' => ts('Date Preference Name') ,
137 'description' => 'The meta name for this date (fixed in code)',
140 'size' => CRM_Utils_Type
::BIG
,
142 'description' => array(
143 'name' => 'description',
144 'type' => CRM_Utils_Type
::T_STRING
,
145 'title' => ts('Description') ,
146 'description' => 'Description of this date type.',
148 'size' => CRM_Utils_Type
::HUGE
,
152 'type' => CRM_Utils_Type
::T_INT
,
153 'title' => ts('Start') ,
154 'description' => 'The start offset relative to current year',
159 'type' => CRM_Utils_Type
::T_INT
,
160 'title' => ts('End Offset') ,
161 'description' => 'The end offset relative to current year, can be negative',
164 'date_format' => array(
165 'name' => 'date_format',
166 'type' => CRM_Utils_Type
::T_STRING
,
167 'title' => ts('Date Format') ,
168 'description' => 'The date type',
170 'size' => CRM_Utils_Type
::BIG
,
172 'time_format' => array(
173 'name' => 'time_format',
174 'type' => CRM_Utils_Type
::T_STRING
,
175 'title' => ts('Time Format') ,
176 'description' => 'time format',
178 'size' => CRM_Utils_Type
::BIG
,
182 return self
::$_fields;
185 * Returns an array containing, for each field, the arary key used for that
186 * field in self::$_fields.
190 static function &fieldKeys() {
191 if (!(self
::$_fieldKeys)) {
192 self
::$_fieldKeys = array(
195 'description' => 'description',
198 'date_format' => 'date_format',
199 'time_format' => 'time_format',
202 return self
::$_fieldKeys;
205 * Returns the names of this table
209 static function getTableName() {
210 return self
::$_tableName;
213 * Returns if this table needs to be logged
221 * Returns the list of fields that can be imported
223 * @param bool $prefix
227 static function &import($prefix = false) {
228 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'preferences_date', $prefix, array());
232 * Returns the list of fields that can be exported
234 * @param bool $prefix
238 static function &export($prefix = false) {
239 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'preferences_date', $prefix, array());