3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.6 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
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-2015
31 * Generated from xml/schema/CRM/Core/PreferencesDate.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
34 require_once 'CRM/Core/DAO.php';
35 require_once 'CRM/Utils/Type.php';
36 class CRM_Core_DAO_PreferencesDate
extends CRM_Core_DAO
{
38 * static instance to hold the table name
42 static $_tableName = 'civicrm_preferences_date';
44 * static instance to hold the field values
48 static $_fields = null;
50 * static instance to hold the keys used in $_fields for each field.
54 static $_fieldKeys = null;
56 * static instance to hold the FK relationships
60 static $_links = null;
62 * static instance to hold the values that can
67 static $_import = null;
69 * static instance to hold the values that can
74 static $_export = null;
76 * static value to see if we should log any modifications to
77 * this table in the civicrm_log table
88 * The meta name for this date (fixed in code)
94 * Description of this date type.
100 * The start offset relative to current year
106 * The end offset relative to current year, can be negative
126 * @return civicrm_preferences_date
128 function __construct() {
129 $this->__table
= 'civicrm_preferences_date';
130 parent
::__construct();
133 * Returns all the column names of this table
137 static function &fields() {
138 if (!(self
::$_fields)) {
139 self
::$_fields = array(
142 'type' => CRM_Utils_Type
::T_INT
,
147 'type' => CRM_Utils_Type
::T_STRING
,
148 'title' => ts('Name') ,
149 'description' => 'The meta name for this date (fixed in code)',
152 'size' => CRM_Utils_Type
::BIG
,
154 'description' => array(
155 'name' => 'description',
156 'type' => CRM_Utils_Type
::T_STRING
,
157 'title' => ts('Description') ,
158 'description' => 'Description of this date type.',
160 'size' => CRM_Utils_Type
::HUGE
,
164 'type' => CRM_Utils_Type
::T_INT
,
165 'title' => ts('Start') ,
166 'description' => 'The start offset relative to current year',
171 'type' => CRM_Utils_Type
::T_INT
,
172 'title' => ts('End') ,
173 'description' => 'The end offset relative to current year, can be negative',
176 'date_format' => array(
177 'name' => 'date_format',
178 'type' => CRM_Utils_Type
::T_STRING
,
179 'title' => ts('Date Format') ,
180 'description' => 'The date type',
182 'size' => CRM_Utils_Type
::BIG
,
184 'time_format' => array(
185 'name' => 'time_format',
186 'type' => CRM_Utils_Type
::T_STRING
,
187 'title' => ts('Time Format') ,
188 'description' => 'time format',
190 'size' => CRM_Utils_Type
::BIG
,
194 return self
::$_fields;
197 * Returns an array containing, for each field, the arary key used for that
198 * field in self::$_fields.
202 static function &fieldKeys() {
203 if (!(self
::$_fieldKeys)) {
204 self
::$_fieldKeys = array(
207 'description' => 'description',
210 'date_format' => 'date_format',
211 'time_format' => 'time_format',
214 return self
::$_fieldKeys;
217 * Returns the names of this table
221 static function getTableName() {
222 return self
::$_tableName;
225 * Returns if this table needs to be logged
233 * Returns the list of fields that can be imported
235 * @param bool $prefix
239 static function &import($prefix = false) {
240 if (!(self
::$_import)) {
241 self
::$_import = array();
242 $fields = self
::fields();
243 foreach($fields as $name => $field) {
244 if (CRM_Utils_Array
::value('import', $field)) {
246 self
::$_import['preferences_date'] = & $fields[$name];
248 self
::$_import[$name] = & $fields[$name];
253 return self
::$_import;
256 * Returns the list of fields that can be exported
258 * @param bool $prefix
262 static function &export($prefix = false) {
263 if (!(self
::$_export)) {
264 self
::$_export = array();
265 $fields = self
::fields();
266 foreach($fields as $name => $field) {
267 if (CRM_Utils_Array
::value('export', $field)) {
269 self
::$_export['preferences_date'] = & $fields[$name];
271 self
::$_export[$name] = & $fields[$name];
276 return self
::$_export;