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