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 value to see if we should log any modifications to
46 * this table in the civicrm_log table
57 * The meta name for this date (fixed in code)
63 * Description of this date type.
69 * The start offset relative to current year
75 * The end offset relative to current year, can be negative
95 * @return civicrm_preferences_date
97 function __construct() {
98 $this->__table
= 'civicrm_preferences_date';
99 parent
::__construct();
102 * Returns all the column names of this table
106 static function &fields() {
107 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
108 Civi
::$statics[__CLASS__
]['fields'] = array(
111 'type' => CRM_Utils_Type
::T_INT
,
112 'title' => ts('Date Preference ID') ,
117 'type' => CRM_Utils_Type
::T_STRING
,
118 'title' => ts('Date Preference Name') ,
119 'description' => 'The meta name for this date (fixed in code)',
122 'size' => CRM_Utils_Type
::BIG
,
124 'description' => array(
125 'name' => 'description',
126 'type' => CRM_Utils_Type
::T_STRING
,
127 'title' => ts('Description') ,
128 'description' => 'Description of this date type.',
130 'size' => CRM_Utils_Type
::HUGE
,
134 'type' => CRM_Utils_Type
::T_INT
,
135 'title' => ts('Start') ,
136 'description' => 'The start offset relative to current year',
141 'type' => CRM_Utils_Type
::T_INT
,
142 'title' => ts('End Offset') ,
143 'description' => 'The end offset relative to current year, can be negative',
146 'date_format' => array(
147 'name' => 'date_format',
148 'type' => CRM_Utils_Type
::T_STRING
,
149 'title' => ts('Date Format') ,
150 'description' => 'The date type',
152 'size' => CRM_Utils_Type
::BIG
,
154 'time_format' => array(
155 'name' => 'time_format',
156 'type' => CRM_Utils_Type
::T_STRING
,
157 'title' => ts('Time Format') ,
158 'description' => 'time format',
160 'size' => CRM_Utils_Type
::BIG
,
163 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
165 return Civi
::$statics[__CLASS__
]['fields'];
168 * Return a mapping from field-name to the corresponding key (as used in fields()).
171 * Array(string $name => string $uniqueName).
173 static function &fieldKeys() {
174 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
175 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
177 return Civi
::$statics[__CLASS__
]['fieldKeys'];
180 * Returns the names of this table
184 static function getTableName() {
185 return self
::$_tableName;
188 * Returns if this table needs to be logged
196 * Returns the list of fields that can be imported
198 * @param bool $prefix
202 static function &import($prefix = false) {
203 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'preferences_date', $prefix, array());
207 * Returns the list of fields that can be exported
209 * @param bool $prefix
213 static function &export($prefix = false) {
214 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'preferences_date', $prefix, array());