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/Case/CaseType.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:a9a547708dfca9da8c4421dd5edac6ac)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Case_DAO_CaseType constructor.
40 class CRM_Case_DAO_CaseType
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_case_type';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
54 * Autoincremented type id
60 * Machine name for Case Type
66 * Natural language name for Case Type
72 * Description of the Case Type
78 * Is this entry active?
84 * Is this case type a predefined system type?
90 * Ordering of the case types
96 * xml definition of case type
104 function __construct() {
105 $this->__table
= 'civicrm_case_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('Case Type ID') ,
120 'description' => 'Autoincremented type id',
122 'table_name' => 'civicrm_case_type',
123 'entity' => 'CaseType',
124 'bao' => 'CRM_Case_BAO_CaseType',
129 'type' => CRM_Utils_Type
::T_STRING
,
130 'title' => ts('Case Type Name') ,
131 'description' => 'Machine name for Case Type',
134 'size' => CRM_Utils_Type
::BIG
,
135 'table_name' => 'civicrm_case_type',
136 'entity' => 'CaseType',
137 'bao' => 'CRM_Case_BAO_CaseType',
142 'type' => CRM_Utils_Type
::T_STRING
,
143 'title' => ts('Case Type Title') ,
144 'description' => 'Natural language name for Case Type',
147 'size' => CRM_Utils_Type
::BIG
,
148 'table_name' => 'civicrm_case_type',
149 'entity' => 'CaseType',
150 'bao' => 'CRM_Case_BAO_CaseType',
153 'description' => array(
154 'name' => 'description',
155 'type' => CRM_Utils_Type
::T_STRING
,
156 'title' => ts('Case Type Description') ,
157 'description' => 'Description of the Case Type',
159 'size' => CRM_Utils_Type
::HUGE
,
160 'table_name' => 'civicrm_case_type',
161 'entity' => 'CaseType',
162 'bao' => 'CRM_Case_BAO_CaseType',
165 'is_active' => array(
166 'name' => 'is_active',
167 'type' => CRM_Utils_Type
::T_BOOLEAN
,
168 'title' => ts('Case Type Is Active') ,
169 'description' => 'Is this entry active?',
170 'table_name' => 'civicrm_case_type',
171 'entity' => 'CaseType',
172 'bao' => 'CRM_Case_BAO_CaseType',
175 'is_reserved' => array(
176 'name' => 'is_reserved',
177 'type' => CRM_Utils_Type
::T_BOOLEAN
,
178 'title' => ts('Case Type Is Reserved') ,
179 'description' => 'Is this case type a predefined system type?',
180 'table_name' => 'civicrm_case_type',
181 'entity' => 'CaseType',
182 'bao' => 'CRM_Case_BAO_CaseType',
187 'type' => CRM_Utils_Type
::T_INT
,
188 'title' => ts('Order') ,
189 'description' => 'Ordering of the case types',
192 'table_name' => 'civicrm_case_type',
193 'entity' => 'CaseType',
194 'bao' => 'CRM_Case_BAO_CaseType',
197 'definition' => array(
198 'name' => 'definition',
199 'type' => CRM_Utils_Type
::T_BLOB
,
200 'title' => ts('Case Type Definition') ,
201 'description' => 'xml definition of case type',
202 'table_name' => 'civicrm_case_type',
203 'entity' => 'CaseType',
204 'bao' => 'CRM_Case_BAO_CaseType',
208 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
210 return Civi
::$statics[__CLASS__
]['fields'];
213 * Return a mapping from field-name to the corresponding key (as used in fields()).
216 * Array(string $name => string $uniqueName).
218 static function &fieldKeys() {
219 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
220 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
222 return Civi
::$statics[__CLASS__
]['fieldKeys'];
225 * Returns the names of this table
229 static function getTableName() {
230 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
233 * Returns if this table needs to be logged
241 * Returns the list of fields that can be imported
243 * @param bool $prefix
247 static function &import($prefix = false) {
248 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'case_type', $prefix, array());
252 * Returns the list of fields that can be exported
254 * @param bool $prefix
258 static function &export($prefix = false) {
259 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'case_type', $prefix, array());
263 * Returns the list of indices
265 public static function indices($localize = TRUE) {
267 'case_type_name' => array(
268 'name' => 'case_type_name',
272 'localizable' => false,
274 'sig' => 'civicrm_case_type::1::name',
277 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;