3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
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-2017
31 * Generated from xml/schema/CRM/Core/PreferencesDate.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:50b4071bc8734a772c01b450d22f5920)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Core_DAO_PreferencesDate constructor.
40 class CRM_Core_DAO_PreferencesDate
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_preferences_date';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
59 * The meta name for this date (fixed in code)
65 * Description of this date type.
71 * The start offset relative to current year
77 * The end offset relative to current year, can be negative
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') ,
114 'table_name' => 'civicrm_preferences_date',
115 'entity' => 'PreferencesDate',
116 'bao' => 'CRM_Core_BAO_PreferencesDate',
121 'type' => CRM_Utils_Type
::T_STRING
,
122 'title' => ts('Date Preference Name') ,
123 'description' => 'The meta name for this date (fixed in code)',
126 'size' => CRM_Utils_Type
::BIG
,
127 'table_name' => 'civicrm_preferences_date',
128 'entity' => 'PreferencesDate',
129 'bao' => 'CRM_Core_BAO_PreferencesDate',
132 'description' => array(
133 'name' => 'description',
134 'type' => CRM_Utils_Type
::T_STRING
,
135 'title' => ts('Description') ,
136 'description' => 'Description of this date type.',
138 'size' => CRM_Utils_Type
::HUGE
,
139 'table_name' => 'civicrm_preferences_date',
140 'entity' => 'PreferencesDate',
141 'bao' => 'CRM_Core_BAO_PreferencesDate',
146 'type' => CRM_Utils_Type
::T_INT
,
147 'title' => ts('Start') ,
148 'description' => 'The start offset relative to current year',
150 'table_name' => 'civicrm_preferences_date',
151 'entity' => 'PreferencesDate',
152 'bao' => 'CRM_Core_BAO_PreferencesDate',
157 'type' => CRM_Utils_Type
::T_INT
,
158 'title' => ts('End Offset') ,
159 'description' => 'The end offset relative to current year, can be negative',
161 'table_name' => 'civicrm_preferences_date',
162 'entity' => 'PreferencesDate',
163 'bao' => 'CRM_Core_BAO_PreferencesDate',
166 'date_format' => array(
167 'name' => 'date_format',
168 'type' => CRM_Utils_Type
::T_STRING
,
169 'title' => ts('Date Format') ,
170 'description' => 'The date type',
172 'size' => CRM_Utils_Type
::BIG
,
173 'table_name' => 'civicrm_preferences_date',
174 'entity' => 'PreferencesDate',
175 'bao' => 'CRM_Core_BAO_PreferencesDate',
178 'time_format' => array(
179 'name' => 'time_format',
180 'type' => CRM_Utils_Type
::T_STRING
,
181 'title' => ts('Time Format') ,
182 'description' => 'time format',
184 'size' => CRM_Utils_Type
::BIG
,
185 'table_name' => 'civicrm_preferences_date',
186 'entity' => 'PreferencesDate',
187 'bao' => 'CRM_Core_BAO_PreferencesDate',
191 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
193 return Civi
::$statics[__CLASS__
]['fields'];
196 * Return a mapping from field-name to the corresponding key (as used in fields()).
199 * Array(string $name => string $uniqueName).
201 static function &fieldKeys() {
202 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
203 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
205 return Civi
::$statics[__CLASS__
]['fieldKeys'];
208 * Returns the names of this table
212 static function getTableName() {
213 return self
::$_tableName;
216 * Returns if this table needs to be logged
224 * Returns the list of fields that can be imported
226 * @param bool $prefix
230 static function &import($prefix = false) {
231 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'preferences_date', $prefix, array());
235 * Returns the list of fields that can be exported
237 * @param bool $prefix
241 static function &export($prefix = false) {
242 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'preferences_date', $prefix, array());
246 * Returns the list of indices
248 public static function indices($localize = TRUE) {
250 'index_name' => array(
251 'name' => 'index_name',
255 'localizable' => false,
256 'sig' => 'civicrm_preferences_date::0::name',
259 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;