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/LocationType.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:f0327e335eb583862d2bd8afad6444ac)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_LocationType
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_location_type';
45 * static value to see if we should log any modifications to
46 * this table in the civicrm_log table
64 * Location Type Display Name.
70 * vCard Location Type Name.
76 * Location Type Description.
82 * Is this location type a predefined system location?
88 * Is this property active?
94 * Is this location type the default?
102 * @return civicrm_location_type
104 function __construct() {
105 $this->__table
= 'civicrm_location_type';
106 parent
::__construct();
109 * Returns all the column names of this table
113 static function &fields() {
114 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
115 Civi
::$statics[__CLASS__
]['fields'] = array(
118 'type' => CRM_Utils_Type
::T_INT
,
119 'title' => ts('Location Type ID') ,
120 'description' => 'Location Type ID',
125 'type' => CRM_Utils_Type
::T_STRING
,
126 'title' => ts('Location Type') ,
127 'description' => 'Location Type Name.',
129 'size' => CRM_Utils_Type
::BIG
,
131 'display_name' => array(
132 'name' => 'display_name',
133 'type' => CRM_Utils_Type
::T_STRING
,
134 'title' => ts('Display Name') ,
135 'description' => 'Location Type Display Name.',
137 'size' => CRM_Utils_Type
::BIG
,
139 'vcard_name' => array(
140 'name' => 'vcard_name',
141 'type' => CRM_Utils_Type
::T_STRING
,
142 'title' => ts('vCard Location Type') ,
143 'description' => 'vCard Location Type Name.',
145 'size' => CRM_Utils_Type
::BIG
,
147 'description' => array(
148 'name' => 'description',
149 'type' => CRM_Utils_Type
::T_STRING
,
150 'title' => ts('Description') ,
151 'description' => 'Location Type Description.',
153 'size' => CRM_Utils_Type
::HUGE
,
155 'is_reserved' => array(
156 'name' => 'is_reserved',
157 'type' => CRM_Utils_Type
::T_BOOLEAN
,
158 'title' => ts('Location Type is Reserved?') ,
159 'description' => 'Is this location type a predefined system location?',
161 'is_active' => array(
162 'name' => 'is_active',
163 'type' => CRM_Utils_Type
::T_BOOLEAN
,
164 'title' => ts('Location Type is Active?') ,
165 'description' => 'Is this property active?',
167 'is_default' => array(
168 'name' => 'is_default',
169 'type' => CRM_Utils_Type
::T_BOOLEAN
,
170 'title' => ts('Default Location Type?') ,
171 'description' => 'Is this location type the default?',
174 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
176 return Civi
::$statics[__CLASS__
]['fields'];
179 * Return a mapping from field-name to the corresponding key (as used in fields()).
182 * Array(string $name => string $uniqueName).
184 static function &fieldKeys() {
185 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
186 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
188 return Civi
::$statics[__CLASS__
]['fieldKeys'];
191 * Returns the names of this table
195 static function getTableName() {
196 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
199 * Returns if this table needs to be logged
207 * Returns the list of fields that can be imported
209 * @param bool $prefix
213 static function &import($prefix = false) {
214 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'location_type', $prefix, array());
218 * Returns the list of fields that can be exported
220 * @param bool $prefix
224 static function &export($prefix = false) {
225 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'location_type', $prefix, array());