Merge pull request #21943 from mattwire/gccacheignore
[civicrm-core.git] / CRM / Core / DAO / ActionMapping.php
1 <?php
2
3 /**
4 * @package CRM
5 * @copyright CiviCRM LLC https://civicrm.org/licensing
6 *
7 * Generated from xml/schema/CRM/Core/ActionMapping.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:47aaf423930a3ec40089a4b21caaae2c)
10 */
11
12 /**
13 * Database access object for the ActionMapping entity.
14 */
15 class CRM_Core_DAO_ActionMapping extends CRM_Core_DAO {
16 const EXT = 'civicrm';
17 const TABLE_ADDED = '3.4';
18
19 /**
20 * Static instance to hold the table name.
21 *
22 * @var string
23 */
24 public static $_tableName = 'civicrm_action_mapping';
25
26 /**
27 * Should CiviCRM log any modifications to this table in the civicrm_log table.
28 *
29 * @var bool
30 */
31 public static $_log = FALSE;
32
33 /**
34 * @var int|string|null
35 * (SQL type: int unsigned)
36 * Note that values will be retrieved from the database as a string.
37 */
38 public $id;
39
40 /**
41 * Entity for which the reminder is created
42 *
43 * @var string|null
44 * (SQL type: varchar(64))
45 * Note that values will be retrieved from the database as a string.
46 */
47 public $entity;
48
49 /**
50 * Entity value
51 *
52 * @var string|null
53 * (SQL type: varchar(64))
54 * Note that values will be retrieved from the database as a string.
55 */
56 public $entity_value;
57
58 /**
59 * Entity value label
60 *
61 * @var string|null
62 * (SQL type: varchar(64))
63 * Note that values will be retrieved from the database as a string.
64 */
65 public $entity_value_label;
66
67 /**
68 * Entity status
69 *
70 * @var string|null
71 * (SQL type: varchar(64))
72 * Note that values will be retrieved from the database as a string.
73 */
74 public $entity_status;
75
76 /**
77 * Entity status label
78 *
79 * @var string|null
80 * (SQL type: varchar(64))
81 * Note that values will be retrieved from the database as a string.
82 */
83 public $entity_status_label;
84
85 /**
86 * Entity date
87 *
88 * @var string|null
89 * (SQL type: varchar(64))
90 * Note that values will be retrieved from the database as a string.
91 */
92 public $entity_date_start;
93
94 /**
95 * Entity date
96 *
97 * @var string|null
98 * (SQL type: varchar(64))
99 * Note that values will be retrieved from the database as a string.
100 */
101 public $entity_date_end;
102
103 /**
104 * Entity recipient
105 *
106 * @var string|null
107 * (SQL type: varchar(64))
108 * Note that values will be retrieved from the database as a string.
109 */
110 public $entity_recipient;
111
112 /**
113 * Class constructor.
114 */
115 public function __construct() {
116 $this->__table = 'civicrm_action_mapping';
117 parent::__construct();
118 }
119
120 /**
121 * Returns localized title of this entity.
122 *
123 * @param bool $plural
124 * Whether to return the plural version of the title.
125 */
126 public static function getEntityTitle($plural = FALSE) {
127 return $plural ? ts('Action Mappings') : ts('Action Mapping');
128 }
129
130 /**
131 * Returns all the column names of this table
132 *
133 * @return array
134 */
135 public static function &fields() {
136 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
137 Civi::$statics[__CLASS__]['fields'] = [
138 'id' => [
139 'name' => 'id',
140 'type' => CRM_Utils_Type::T_INT,
141 'title' => ts('Action Mapping ID'),
142 'required' => TRUE,
143 'where' => 'civicrm_action_mapping.id',
144 'table_name' => 'civicrm_action_mapping',
145 'entity' => 'ActionMapping',
146 'bao' => 'CRM_Core_DAO_ActionMapping',
147 'localizable' => 0,
148 'html' => [
149 'type' => 'Number',
150 ],
151 'readonly' => TRUE,
152 'add' => '3.4',
153 ],
154 'entity' => [
155 'name' => 'entity',
156 'type' => CRM_Utils_Type::T_STRING,
157 'title' => ts('Action Mapping Entity'),
158 'description' => ts('Entity for which the reminder is created'),
159 'maxlength' => 64,
160 'size' => CRM_Utils_Type::BIG,
161 'where' => 'civicrm_action_mapping.entity',
162 'table_name' => 'civicrm_action_mapping',
163 'entity' => 'ActionMapping',
164 'bao' => 'CRM_Core_DAO_ActionMapping',
165 'localizable' => 0,
166 'add' => '3.4',
167 ],
168 'entity_value' => [
169 'name' => 'entity_value',
170 'type' => CRM_Utils_Type::T_STRING,
171 'title' => ts('Action Mapping Entity Value'),
172 'description' => ts('Entity value'),
173 'maxlength' => 64,
174 'size' => CRM_Utils_Type::BIG,
175 'where' => 'civicrm_action_mapping.entity_value',
176 'table_name' => 'civicrm_action_mapping',
177 'entity' => 'ActionMapping',
178 'bao' => 'CRM_Core_DAO_ActionMapping',
179 'localizable' => 0,
180 'add' => '3.4',
181 ],
182 'entity_value_label' => [
183 'name' => 'entity_value_label',
184 'type' => CRM_Utils_Type::T_STRING,
185 'title' => ts('Value Label'),
186 'description' => ts('Entity value label'),
187 'maxlength' => 64,
188 'size' => CRM_Utils_Type::BIG,
189 'where' => 'civicrm_action_mapping.entity_value_label',
190 'table_name' => 'civicrm_action_mapping',
191 'entity' => 'ActionMapping',
192 'bao' => 'CRM_Core_DAO_ActionMapping',
193 'localizable' => 0,
194 'add' => '3.4',
195 ],
196 'entity_status' => [
197 'name' => 'entity_status',
198 'type' => CRM_Utils_Type::T_STRING,
199 'title' => ts('Status'),
200 'description' => ts('Entity status'),
201 'maxlength' => 64,
202 'size' => CRM_Utils_Type::BIG,
203 'where' => 'civicrm_action_mapping.entity_status',
204 'table_name' => 'civicrm_action_mapping',
205 'entity' => 'ActionMapping',
206 'bao' => 'CRM_Core_DAO_ActionMapping',
207 'localizable' => 0,
208 'add' => '3.4',
209 ],
210 'entity_status_label' => [
211 'name' => 'entity_status_label',
212 'type' => CRM_Utils_Type::T_STRING,
213 'title' => ts('Status Label'),
214 'description' => ts('Entity status label'),
215 'maxlength' => 64,
216 'size' => CRM_Utils_Type::BIG,
217 'where' => 'civicrm_action_mapping.entity_status_label',
218 'table_name' => 'civicrm_action_mapping',
219 'entity' => 'ActionMapping',
220 'bao' => 'CRM_Core_DAO_ActionMapping',
221 'localizable' => 0,
222 'add' => '3.4',
223 ],
224 'entity_date_start' => [
225 'name' => 'entity_date_start',
226 'type' => CRM_Utils_Type::T_STRING,
227 'title' => ts('Entity Start Date'),
228 'description' => ts('Entity date'),
229 'maxlength' => 64,
230 'size' => CRM_Utils_Type::BIG,
231 'where' => 'civicrm_action_mapping.entity_date_start',
232 'table_name' => 'civicrm_action_mapping',
233 'entity' => 'ActionMapping',
234 'bao' => 'CRM_Core_DAO_ActionMapping',
235 'localizable' => 0,
236 'add' => '3.4',
237 ],
238 'entity_date_end' => [
239 'name' => 'entity_date_end',
240 'type' => CRM_Utils_Type::T_STRING,
241 'title' => ts('Entity End Date'),
242 'description' => ts('Entity date'),
243 'maxlength' => 64,
244 'size' => CRM_Utils_Type::BIG,
245 'where' => 'civicrm_action_mapping.entity_date_end',
246 'table_name' => 'civicrm_action_mapping',
247 'entity' => 'ActionMapping',
248 'bao' => 'CRM_Core_DAO_ActionMapping',
249 'localizable' => 0,
250 'add' => '3.4',
251 ],
252 'entity_recipient' => [
253 'name' => 'entity_recipient',
254 'type' => CRM_Utils_Type::T_STRING,
255 'title' => ts('Entity Recipient'),
256 'description' => ts('Entity recipient'),
257 'maxlength' => 64,
258 'size' => CRM_Utils_Type::BIG,
259 'where' => 'civicrm_action_mapping.entity_recipient',
260 'table_name' => 'civicrm_action_mapping',
261 'entity' => 'ActionMapping',
262 'bao' => 'CRM_Core_DAO_ActionMapping',
263 'localizable' => 0,
264 'add' => '3.4',
265 ],
266 ];
267 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
268 }
269 return Civi::$statics[__CLASS__]['fields'];
270 }
271
272 /**
273 * Return a mapping from field-name to the corresponding key (as used in fields()).
274 *
275 * @return array
276 * Array(string $name => string $uniqueName).
277 */
278 public static function &fieldKeys() {
279 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
280 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
281 }
282 return Civi::$statics[__CLASS__]['fieldKeys'];
283 }
284
285 /**
286 * Returns the names of this table
287 *
288 * @return string
289 */
290 public static function getTableName() {
291 return self::$_tableName;
292 }
293
294 /**
295 * Returns if this table needs to be logged
296 *
297 * @return bool
298 */
299 public function getLog() {
300 return self::$_log;
301 }
302
303 /**
304 * Returns the list of fields that can be imported
305 *
306 * @param bool $prefix
307 *
308 * @return array
309 */
310 public static function &import($prefix = FALSE) {
311 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'action_mapping', $prefix, []);
312 return $r;
313 }
314
315 /**
316 * Returns the list of fields that can be exported
317 *
318 * @param bool $prefix
319 *
320 * @return array
321 */
322 public static function &export($prefix = FALSE) {
323 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'action_mapping', $prefix, []);
324 return $r;
325 }
326
327 /**
328 * Returns the list of indices
329 *
330 * @param bool $localize
331 *
332 * @return array
333 */
334 public static function indices($localize = TRUE) {
335 $indices = [];
336 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
337 }
338
339 }