Regen DAOs with new import() / export()
[civicrm-core.git] / CRM / Core / DAO / PreferencesDate.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
9 | |
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. |
13 | |
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. |
18 | |
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 +--------------------------------------------------------------------+
26 */
27 /**
28 * @package CRM
29 * @copyright CiviCRM LLC (c) 2004-2016
30 *
31 * Generated from xml/schema/CRM/Core/PreferencesDate.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:85f54758c28f13fd4ec48f1bf45a9875)
34 */
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_PreferencesDate extends CRM_Core_DAO {
38 /**
39 * static instance to hold the table name
40 *
41 * @var string
42 */
43 static $_tableName = 'civicrm_preferences_date';
44 /**
45 * static instance to hold the field values
46 *
47 * @var array
48 */
49 static $_fields = null;
50 /**
51 * static instance to hold the keys used in $_fields for each field.
52 *
53 * @var array
54 */
55 static $_fieldKeys = null;
56 /**
57 * static instance to hold the FK relationships
58 *
59 * @var string
60 */
61 static $_links = null;
62 /**
63 * static value to see if we should log any modifications to
64 * this table in the civicrm_log table
65 *
66 * @var boolean
67 */
68 static $_log = true;
69 /**
70 *
71 * @var int unsigned
72 */
73 public $id;
74 /**
75 * The meta name for this date (fixed in code)
76 *
77 * @var string
78 */
79 public $name;
80 /**
81 * Description of this date type.
82 *
83 * @var string
84 */
85 public $description;
86 /**
87 * The start offset relative to current year
88 *
89 * @var int
90 */
91 public $start;
92 /**
93 * The end offset relative to current year, can be negative
94 *
95 * @var int
96 */
97 public $end;
98 /**
99 * The date type
100 *
101 * @var string
102 */
103 public $date_format;
104 /**
105 * time format
106 *
107 * @var string
108 */
109 public $time_format;
110 /**
111 * class constructor
112 *
113 * @return civicrm_preferences_date
114 */
115 function __construct() {
116 $this->__table = 'civicrm_preferences_date';
117 parent::__construct();
118 }
119 /**
120 * Returns all the column names of this table
121 *
122 * @return array
123 */
124 static function &fields() {
125 if (!(self::$_fields)) {
126 self::$_fields = array(
127 'id' => array(
128 'name' => 'id',
129 'type' => CRM_Utils_Type::T_INT,
130 'title' => ts('Date Preference ID') ,
131 'required' => true,
132 ) ,
133 'name' => array(
134 'name' => 'name',
135 'type' => CRM_Utils_Type::T_STRING,
136 'title' => ts('Date Preference Name') ,
137 'description' => 'The meta name for this date (fixed in code)',
138 'required' => true,
139 'maxlength' => 64,
140 'size' => CRM_Utils_Type::BIG,
141 ) ,
142 'description' => array(
143 'name' => 'description',
144 'type' => CRM_Utils_Type::T_STRING,
145 'title' => ts('Description') ,
146 'description' => 'Description of this date type.',
147 'maxlength' => 255,
148 'size' => CRM_Utils_Type::HUGE,
149 ) ,
150 'start' => array(
151 'name' => 'start',
152 'type' => CRM_Utils_Type::T_INT,
153 'title' => ts('Start') ,
154 'description' => 'The start offset relative to current year',
155 'required' => true,
156 ) ,
157 'end' => array(
158 'name' => 'end',
159 'type' => CRM_Utils_Type::T_INT,
160 'title' => ts('End Offset') ,
161 'description' => 'The end offset relative to current year, can be negative',
162 'required' => true,
163 ) ,
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',
169 'maxlength' => 64,
170 'size' => CRM_Utils_Type::BIG,
171 ) ,
172 'time_format' => array(
173 'name' => 'time_format',
174 'type' => CRM_Utils_Type::T_STRING,
175 'title' => ts('Time Format') ,
176 'description' => 'time format',
177 'maxlength' => 64,
178 'size' => CRM_Utils_Type::BIG,
179 ) ,
180 );
181 }
182 return self::$_fields;
183 }
184 /**
185 * Returns an array containing, for each field, the arary key used for that
186 * field in self::$_fields.
187 *
188 * @return array
189 */
190 static function &fieldKeys() {
191 if (!(self::$_fieldKeys)) {
192 self::$_fieldKeys = array(
193 'id' => 'id',
194 'name' => 'name',
195 'description' => 'description',
196 'start' => 'start',
197 'end' => 'end',
198 'date_format' => 'date_format',
199 'time_format' => 'time_format',
200 );
201 }
202 return self::$_fieldKeys;
203 }
204 /**
205 * Returns the names of this table
206 *
207 * @return string
208 */
209 static function getTableName() {
210 return self::$_tableName;
211 }
212 /**
213 * Returns if this table needs to be logged
214 *
215 * @return boolean
216 */
217 function getLog() {
218 return self::$_log;
219 }
220 /**
221 * Returns the list of fields that can be imported
222 *
223 * @param bool $prefix
224 *
225 * @return array
226 */
227 static function &import($prefix = false) {
228 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'preferences_date', $prefix, array());
229 return $r;
230 }
231 /**
232 * Returns the list of fields that can be exported
233 *
234 * @param bool $prefix
235 *
236 * @return array
237 */
238 static function &export($prefix = false) {
239 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'preferences_date', $prefix, array());
240 return $r;
241 }
242 }