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