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 | |
f29bf4f3 | 9 | * (GenCodeChecksum:b597d359bb254799b8756ee555156dc3) |
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 | |
e501603b TO |
100 | /** |
101 | * Returns all the column names of this table | |
102 | * | |
103 | * @return array | |
104 | */ | |
c3fc2621 | 105 | public static function &fields() { |
346aaaba | 106 | if (!isset(Civi::$statics[__CLASS__]['fields'])) { |
c3fc2621 CW |
107 | Civi::$statics[__CLASS__]['fields'] = [ |
108 | 'id' => [ | |
e501603b TO |
109 | 'name' => 'id', |
110 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 CW |
111 | 'title' => ts('Action Mapping ID'), |
112 | 'required' => TRUE, | |
a36434b9 | 113 | 'where' => 'civicrm_action_mapping.id', |
522a26c9 | 114 | 'table_name' => 'civicrm_action_mapping', |
115 | 'entity' => 'ActionMapping', | |
116 | 'bao' => 'CRM_Core_DAO_ActionMapping', | |
6a7e5e5d | 117 | 'localizable' => 0, |
c3fc2621 CW |
118 | ], |
119 | 'entity' => [ | |
e501603b TO |
120 | 'name' => 'entity', |
121 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 122 | 'title' => ts('Action Mapping Entity'), |
215b423e | 123 | 'description' => ts('Entity for which the reminder is created'), |
e501603b TO |
124 | 'maxlength' => 64, |
125 | 'size' => CRM_Utils_Type::BIG, | |
a36434b9 | 126 | 'where' => 'civicrm_action_mapping.entity', |
522a26c9 | 127 | 'table_name' => 'civicrm_action_mapping', |
128 | 'entity' => 'ActionMapping', | |
129 | 'bao' => 'CRM_Core_DAO_ActionMapping', | |
6a7e5e5d | 130 | 'localizable' => 0, |
c3fc2621 CW |
131 | ], |
132 | 'entity_value' => [ | |
e501603b TO |
133 | 'name' => 'entity_value', |
134 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 135 | 'title' => ts('Action Mapping Entity Value'), |
215b423e | 136 | 'description' => ts('Entity value'), |
e501603b TO |
137 | 'maxlength' => 64, |
138 | 'size' => CRM_Utils_Type::BIG, | |
a36434b9 | 139 | 'where' => 'civicrm_action_mapping.entity_value', |
522a26c9 | 140 | 'table_name' => 'civicrm_action_mapping', |
141 | 'entity' => 'ActionMapping', | |
142 | 'bao' => 'CRM_Core_DAO_ActionMapping', | |
6a7e5e5d | 143 | 'localizable' => 0, |
c3fc2621 CW |
144 | ], |
145 | 'entity_value_label' => [ | |
e501603b TO |
146 | 'name' => 'entity_value_label', |
147 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 148 | 'title' => ts('Value Label'), |
215b423e | 149 | 'description' => ts('Entity value label'), |
e501603b TO |
150 | 'maxlength' => 64, |
151 | 'size' => CRM_Utils_Type::BIG, | |
a36434b9 | 152 | 'where' => 'civicrm_action_mapping.entity_value_label', |
522a26c9 | 153 | 'table_name' => 'civicrm_action_mapping', |
154 | 'entity' => 'ActionMapping', | |
155 | 'bao' => 'CRM_Core_DAO_ActionMapping', | |
6a7e5e5d | 156 | 'localizable' => 0, |
c3fc2621 CW |
157 | ], |
158 | 'entity_status' => [ | |
e501603b TO |
159 | 'name' => 'entity_status', |
160 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 161 | 'title' => ts('Status'), |
215b423e | 162 | 'description' => ts('Entity status'), |
e501603b TO |
163 | 'maxlength' => 64, |
164 | 'size' => CRM_Utils_Type::BIG, | |
a36434b9 | 165 | 'where' => 'civicrm_action_mapping.entity_status', |
522a26c9 | 166 | 'table_name' => 'civicrm_action_mapping', |
167 | 'entity' => 'ActionMapping', | |
168 | 'bao' => 'CRM_Core_DAO_ActionMapping', | |
6a7e5e5d | 169 | 'localizable' => 0, |
c3fc2621 CW |
170 | ], |
171 | 'entity_status_label' => [ | |
e501603b TO |
172 | 'name' => 'entity_status_label', |
173 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 174 | 'title' => ts('Status Label'), |
215b423e | 175 | 'description' => ts('Entity status label'), |
e501603b TO |
176 | 'maxlength' => 64, |
177 | 'size' => CRM_Utils_Type::BIG, | |
a36434b9 | 178 | 'where' => 'civicrm_action_mapping.entity_status_label', |
522a26c9 | 179 | 'table_name' => 'civicrm_action_mapping', |
180 | 'entity' => 'ActionMapping', | |
181 | 'bao' => 'CRM_Core_DAO_ActionMapping', | |
6a7e5e5d | 182 | 'localizable' => 0, |
c3fc2621 CW |
183 | ], |
184 | 'entity_date_start' => [ | |
e501603b TO |
185 | 'name' => 'entity_date_start', |
186 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 187 | 'title' => ts('Entity Start Date'), |
215b423e | 188 | 'description' => ts('Entity date'), |
e501603b TO |
189 | 'maxlength' => 64, |
190 | 'size' => CRM_Utils_Type::BIG, | |
a36434b9 | 191 | 'where' => 'civicrm_action_mapping.entity_date_start', |
522a26c9 | 192 | 'table_name' => 'civicrm_action_mapping', |
193 | 'entity' => 'ActionMapping', | |
194 | 'bao' => 'CRM_Core_DAO_ActionMapping', | |
6a7e5e5d | 195 | 'localizable' => 0, |
c3fc2621 CW |
196 | ], |
197 | 'entity_date_end' => [ | |
e501603b TO |
198 | 'name' => 'entity_date_end', |
199 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 200 | 'title' => ts('Entity End 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_end', |
522a26c9 | 205 | 'table_name' => 'civicrm_action_mapping', |
206 | 'entity' => 'ActionMapping', | |
207 | 'bao' => 'CRM_Core_DAO_ActionMapping', | |
6a7e5e5d | 208 | 'localizable' => 0, |
c3fc2621 CW |
209 | ], |
210 | 'entity_recipient' => [ | |
e501603b TO |
211 | 'name' => 'entity_recipient', |
212 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 213 | 'title' => ts('Entity Recipient'), |
215b423e | 214 | 'description' => ts('Entity recipient'), |
e501603b TO |
215 | 'maxlength' => 64, |
216 | 'size' => CRM_Utils_Type::BIG, | |
a36434b9 | 217 | 'where' => 'civicrm_action_mapping.entity_recipient', |
522a26c9 | 218 | 'table_name' => 'civicrm_action_mapping', |
219 | 'entity' => 'ActionMapping', | |
220 | 'bao' => 'CRM_Core_DAO_ActionMapping', | |
6a7e5e5d | 221 | 'localizable' => 0, |
c3fc2621 CW |
222 | ], |
223 | ]; | |
346aaaba | 224 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); |
e501603b | 225 | } |
346aaaba | 226 | return Civi::$statics[__CLASS__]['fields']; |
e501603b | 227 | } |
c3fc2621 | 228 | |
e501603b | 229 | /** |
bd8e0b14 | 230 | * Return a mapping from field-name to the corresponding key (as used in fields()). |
e501603b TO |
231 | * |
232 | * @return array | |
bd8e0b14 | 233 | * Array(string $name => string $uniqueName). |
e501603b | 234 | */ |
c3fc2621 | 235 | public static function &fieldKeys() { |
bd8e0b14 TO |
236 | if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { |
237 | Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); | |
e501603b | 238 | } |
bd8e0b14 | 239 | return Civi::$statics[__CLASS__]['fieldKeys']; |
e501603b | 240 | } |
c3fc2621 | 241 | |
e501603b TO |
242 | /** |
243 | * Returns the names of this table | |
244 | * | |
245 | * @return string | |
246 | */ | |
c3fc2621 | 247 | public static function getTableName() { |
e501603b TO |
248 | return self::$_tableName; |
249 | } | |
c3fc2621 | 250 | |
e501603b TO |
251 | /** |
252 | * Returns if this table needs to be logged | |
253 | * | |
c3fc2621 | 254 | * @return bool |
e501603b | 255 | */ |
c3fc2621 | 256 | public function getLog() { |
e501603b TO |
257 | return self::$_log; |
258 | } | |
c3fc2621 | 259 | |
e501603b TO |
260 | /** |
261 | * Returns the list of fields that can be imported | |
262 | * | |
263 | * @param bool $prefix | |
264 | * | |
265 | * @return array | |
266 | */ | |
c3fc2621 CW |
267 | public static function &import($prefix = FALSE) { |
268 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'action_mapping', $prefix, []); | |
60808919 | 269 | return $r; |
e501603b | 270 | } |
c3fc2621 | 271 | |
e501603b TO |
272 | /** |
273 | * Returns the list of fields that can be exported | |
274 | * | |
275 | * @param bool $prefix | |
276 | * | |
277 | * @return array | |
278 | */ | |
c3fc2621 CW |
279 | public static function &export($prefix = FALSE) { |
280 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'action_mapping', $prefix, []); | |
60808919 | 281 | return $r; |
e501603b | 282 | } |
c3fc2621 | 283 | |
e7a6b91a AS |
284 | /** |
285 | * Returns the list of indices | |
c3fc2621 CW |
286 | * |
287 | * @param bool $localize | |
288 | * | |
289 | * @return array | |
e7a6b91a AS |
290 | */ |
291 | public static function indices($localize = TRUE) { | |
c3fc2621 | 292 | $indices = []; |
e7a6b91a AS |
293 | return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; |
294 | } | |
c3fc2621 | 295 | |
e501603b | 296 | } |