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