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