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/Timezone.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:be63fa40c8b49d870a708348a633ed58)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_Timezone
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_timezone';
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 instance to hold the values that can
68 static $_import = null;
70 * static instance to hold the values that can
75 static $_export = null;
77 * static value to see if we should log any modifications to
78 * this table in the civicrm_log table
96 * ISO Code for timezone abbreviation
100 public $abbreviation;
102 * GMT name of the timezone
121 * @return civicrm_timezone
123 function __construct() {
124 $this->__table
= 'civicrm_timezone';
125 parent
::__construct();
128 * Returns foreign keys and entity references
131 * [CRM_Core_Reference_Interface]
133 static function getReferenceColumns() {
134 if (!self
::$_links) {
135 self
::$_links = static ::createReferenceColumns(__CLASS__
);
136 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'country_id', 'civicrm_country', 'id');
138 return self
::$_links;
141 * Returns all the column names of this table
145 static function &fields() {
146 if (!(self
::$_fields)) {
147 self
::$_fields = array(
150 'type' => CRM_Utils_Type
::T_INT
,
151 'title' => ts('Timezone ID') ,
152 'description' => 'Timezone Id',
157 'type' => CRM_Utils_Type
::T_STRING
,
158 'title' => ts('Timezone Name') ,
159 'description' => 'Timezone full name',
161 'size' => CRM_Utils_Type
::BIG
,
163 'abbreviation' => array(
164 'name' => 'abbreviation',
165 'type' => CRM_Utils_Type
::T_STRING
,
166 'title' => ts('Timezone Abbreviation') ,
167 'description' => 'ISO Code for timezone abbreviation',
169 'size' => CRM_Utils_Type
::FOUR
,
173 'type' => CRM_Utils_Type
::T_STRING
,
174 'title' => ts('GMT Name of Timezone') ,
175 'description' => 'GMT name of the timezone',
177 'size' => CRM_Utils_Type
::BIG
,
181 'type' => CRM_Utils_Type
::T_INT
,
182 'title' => ts('GMT Offset') ,
184 'country_id' => array(
185 'name' => 'country_id',
186 'type' => CRM_Utils_Type
::T_INT
,
187 'title' => ts('Country') ,
188 'description' => 'Country Id',
190 'FKClassName' => 'CRM_Core_DAO_Country',
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 'abbreviation' => 'abbreviation',
209 'offset' => 'offset',
210 'country_id' => 'country_id',
213 return self
::$_fieldKeys;
216 * Returns the names of this table
220 static function getTableName() {
221 return self
::$_tableName;
224 * Returns if this table needs to be logged
232 * Returns the list of fields that can be imported
234 * @param bool $prefix
238 static function &import($prefix = false) {
239 if (!(self
::$_import)) {
240 self
::$_import = array();
241 $fields = self
::fields();
242 foreach($fields as $name => $field) {
243 if (CRM_Utils_Array
::value('import', $field)) {
245 self
::$_import['timezone'] = & $fields[$name];
247 self
::$_import[$name] = & $fields[$name];
252 return self
::$_import;
255 * Returns the list of fields that can be exported
257 * @param bool $prefix
261 static function &export($prefix = false) {
262 if (!(self
::$_export)) {
263 self
::$_export = array();
264 $fields = self
::fields();
265 foreach($fields as $name => $field) {
266 if (CRM_Utils_Array
::value('export', $field)) {
268 self
::$_export['timezone'] = & $fields[$name];
270 self
::$_export[$name] = & $fields[$name];
275 return self
::$_export;