5 * @copyright CiviCRM LLC (c) 2004-2019
7 * Generated from xml/schema/CRM/Case/CaseType.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:9ebd07607858eaf185b2be32744267bb)
13 * Database access object for the CaseType entity.
15 class CRM_Case_DAO_CaseType
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 static $_tableName = 'civicrm_case_type';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
32 * Autoincremented type id
39 * Machine name for Case Type
46 * Natural language name for Case Type
53 * Description of the Case Type
60 * Is this entry active?
67 * Is this case type a predefined system type?
74 * Ordering of the case types
81 * xml definition of case type
90 public function __construct() {
91 $this->__table
= 'civicrm_case_type';
92 parent
::__construct();
96 * Returns all the column names of this table
100 public static function &fields() {
101 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
102 Civi
::$statics[__CLASS__
]['fields'] = [
105 'type' => CRM_Utils_Type
::T_INT
,
106 'title' => ts('Case Type ID'),
107 'description' => ts('Autoincremented type id'),
109 'table_name' => 'civicrm_case_type',
110 'entity' => 'CaseType',
111 'bao' => 'CRM_Case_BAO_CaseType',
116 'type' => CRM_Utils_Type
::T_STRING
,
117 'title' => ts('Case Type Name'),
118 'description' => ts('Machine name for Case Type'),
121 'size' => CRM_Utils_Type
::BIG
,
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 Title'),
131 'description' => ts('Natural language 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',
141 'name' => 'description',
142 'type' => CRM_Utils_Type
::T_STRING
,
143 'title' => ts('Case Type Description'),
144 'description' => ts('Description of the Case Type'),
146 'size' => CRM_Utils_Type
::HUGE
,
147 'table_name' => 'civicrm_case_type',
148 'entity' => 'CaseType',
149 'bao' => 'CRM_Case_BAO_CaseType',
153 'name' => 'is_active',
154 'type' => CRM_Utils_Type
::T_BOOLEAN
,
155 'title' => ts('Case Type Is Active'),
156 'description' => ts('Is this entry active?'),
157 'table_name' => 'civicrm_case_type',
158 'entity' => 'CaseType',
159 'bao' => 'CRM_Case_BAO_CaseType',
163 'name' => 'is_reserved',
164 'type' => CRM_Utils_Type
::T_BOOLEAN
,
165 'title' => ts('Case Type Is Reserved'),
166 'description' => ts('Is this case type a predefined system type?'),
167 'table_name' => 'civicrm_case_type',
168 'entity' => 'CaseType',
169 'bao' => 'CRM_Case_BAO_CaseType',
174 'type' => CRM_Utils_Type
::T_INT
,
175 'title' => ts('Order'),
176 'description' => ts('Ordering of the case types'),
179 'table_name' => 'civicrm_case_type',
180 'entity' => 'CaseType',
181 'bao' => 'CRM_Case_BAO_CaseType',
185 'name' => 'definition',
186 'type' => CRM_Utils_Type
::T_BLOB
,
187 'title' => ts('Case Type Definition'),
188 'description' => ts('xml definition of case type'),
189 'table_name' => 'civicrm_case_type',
190 'entity' => 'CaseType',
191 'bao' => 'CRM_Case_BAO_CaseType',
195 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
197 return Civi
::$statics[__CLASS__
]['fields'];
201 * Return a mapping from field-name to the corresponding key (as used in fields()).
204 * Array(string $name => string $uniqueName).
206 public static function &fieldKeys() {
207 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
208 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
210 return Civi
::$statics[__CLASS__
]['fieldKeys'];
214 * Returns the names of this table
218 public static function getTableName() {
219 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
223 * Returns if this table needs to be logged
227 public function getLog() {
232 * Returns the list of fields that can be imported
234 * @param bool $prefix
238 public static function &import($prefix = FALSE) {
239 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'case_type', $prefix, []);
244 * Returns the list of fields that can be exported
246 * @param bool $prefix
250 public static function &export($prefix = FALSE) {
251 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'case_type', $prefix, []);
256 * Returns the list of indices
258 * @param bool $localize
262 public static function indices($localize = TRUE) {
264 'case_type_name' => [
265 'name' => 'case_type_name',
269 'localizable' => FALSE,
271 'sig' => 'civicrm_case_type::1::name',
274 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;