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