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/LocationType.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_LocationType
extends CRM_Core_DAO
{
38 * static instance to hold the table name
42 static $_tableName = 'civicrm_location_type';
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
95 * Location Type Display Name.
101 * vCard Location Type Name.
107 * Location Type Description.
113 * Is this location type a predefined system location?
119 * Is this property active?
125 * Is this location type the default?
133 * @return civicrm_location_type
135 function __construct() {
136 $this->__table
= 'civicrm_location_type';
137 parent
::__construct();
140 * Returns all the column names of this table
144 static function &fields() {
145 if (!(self
::$_fields)) {
146 self
::$_fields = array(
149 'type' => CRM_Utils_Type
::T_INT
,
150 'title' => ts('Location Type ID') ,
151 'description' => 'Location Type ID',
156 'type' => CRM_Utils_Type
::T_STRING
,
157 'title' => ts('Location Type') ,
158 'description' => 'Location Type Name.',
160 'size' => CRM_Utils_Type
::BIG
,
162 'display_name' => array(
163 'name' => 'display_name',
164 'type' => CRM_Utils_Type
::T_STRING
,
165 'title' => ts('Display Name') ,
166 'description' => 'Location Type Display Name.',
168 'size' => CRM_Utils_Type
::BIG
,
170 'vcard_name' => array(
171 'name' => 'vcard_name',
172 'type' => CRM_Utils_Type
::T_STRING
,
173 'title' => ts('vCard Location Type') ,
174 'description' => 'vCard Location Type Name.',
176 'size' => CRM_Utils_Type
::BIG
,
178 'description' => array(
179 'name' => 'description',
180 'type' => CRM_Utils_Type
::T_STRING
,
181 'title' => ts('Description') ,
182 'description' => 'Location Type Description.',
184 'size' => CRM_Utils_Type
::HUGE
,
186 'is_reserved' => array(
187 'name' => 'is_reserved',
188 'type' => CRM_Utils_Type
::T_BOOLEAN
,
189 'title' => ts('Location Type is Reserved?') ,
190 'description' => 'Is this location type a predefined system location?',
192 'is_active' => array(
193 'name' => 'is_active',
194 'type' => CRM_Utils_Type
::T_BOOLEAN
,
195 'title' => ts('Location Type is Active?') ,
196 'description' => 'Is this property active?',
198 'is_default' => array(
199 'name' => 'is_default',
200 'type' => CRM_Utils_Type
::T_BOOLEAN
,
201 'title' => ts('Default Location Type?') ,
202 'description' => 'Is this location type the default?',
206 return self
::$_fields;
209 * Returns an array containing, for each field, the arary key used for that
210 * field in self::$_fields.
214 static function &fieldKeys() {
215 if (!(self
::$_fieldKeys)) {
216 self
::$_fieldKeys = array(
219 'display_name' => 'display_name',
220 'vcard_name' => 'vcard_name',
221 'description' => 'description',
222 'is_reserved' => 'is_reserved',
223 'is_active' => 'is_active',
224 'is_default' => 'is_default',
227 return self
::$_fieldKeys;
230 * Returns the names of this table
234 static function getTableName() {
235 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
238 * Returns if this table needs to be logged
246 * Returns the list of fields that can be imported
248 * @param bool $prefix
252 static function &import($prefix = false) {
253 if (!(self
::$_import)) {
254 self
::$_import = array();
255 $fields = self
::fields();
256 foreach($fields as $name => $field) {
257 if (CRM_Utils_Array
::value('import', $field)) {
259 self
::$_import['location_type'] = & $fields[$name];
261 self
::$_import[$name] = & $fields[$name];
266 return self
::$_import;
269 * Returns the list of fields that can be exported
271 * @param bool $prefix
275 static function &export($prefix = false) {
276 if (!(self
::$_export)) {
277 self
::$_export = array();
278 $fields = self
::fields();
279 foreach($fields as $name => $field) {
280 if (CRM_Utils_Array
::value('export', $field)) {
282 self
::$_export['location_type'] = & $fields[$name];
284 self
::$_export[$name] = & $fields[$name];
289 return self
::$_export;