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