Merge pull request #12056 from eileenmcnaughton/pcp
[civicrm-core.git] / CRM / Core / DAO / ActionSchedule.php
CommitLineData
e501603b 1<?php
c3fc2621 2
e501603b
TO
3/**
4 * @package CRM
8c9251b3 5 * @copyright CiviCRM LLC (c) 2004-2018
e501603b
TO
6 *
7 * Generated from xml/schema/CRM/Core/ActionSchedule.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
022785d8 9 * (GenCodeChecksum:d158b2da297ca83e4210a3fa0da8d5eb)
e501603b 10 */
c3fc2621 11
f41f0342 12/**
c3fc2621 13 * Database access object for the ActionSchedule entity.
f41f0342 14 */
e501603b 15class CRM_Core_DAO_ActionSchedule extends CRM_Core_DAO {
c3fc2621 16
e501603b 17 /**
f41f0342 18 * Static instance to hold the table name.
e501603b
TO
19 *
20 * @var string
21 */
22 static $_tableName = 'civicrm_action_schedule';
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 */
c3fc2621
CW
29 static $_log = FALSE;
30
e501603b 31 /**
e501603b
TO
32 * @var int unsigned
33 */
34 public $id;
c3fc2621 35
e501603b
TO
36 /**
37 * Name of the action(reminder)
38 *
39 * @var string
40 */
41 public $name;
c3fc2621 42
e501603b
TO
43 /**
44 * Title of the action(reminder)
45 *
46 * @var string
47 */
48 public $title;
c3fc2621 49
e501603b
TO
50 /**
51 * Recipient
52 *
53 * @var string
54 */
55 public $recipient;
c3fc2621 56
e501603b
TO
57 /**
58 * Is this the recipient criteria limited to OR in addition to?
59 *
60 * @var boolean
61 */
62 public $limit_to;
c3fc2621 63
e501603b
TO
64 /**
65 * Entity value
66 *
67 * @var string
68 */
69 public $entity_value;
c3fc2621 70
e501603b
TO
71 /**
72 * Entity status
73 *
74 * @var string
75 */
76 public $entity_status;
c3fc2621 77
e501603b
TO
78 /**
79 * Reminder Interval.
80 *
81 * @var int unsigned
82 */
83 public $start_action_offset;
c3fc2621 84
e501603b
TO
85 /**
86 * Time units for reminder.
87 *
88 * @var string
89 */
90 public $start_action_unit;
c3fc2621 91
e501603b
TO
92 /**
93 * Reminder Action
94 *
95 * @var string
96 */
97 public $start_action_condition;
c3fc2621 98
e501603b
TO
99 /**
100 * Entity date
101 *
102 * @var string
103 */
104 public $start_action_date;
c3fc2621 105
e501603b 106 /**
e501603b
TO
107 * @var boolean
108 */
109 public $is_repeat;
c3fc2621 110
e501603b
TO
111 /**
112 * Time units for repetition of reminder.
113 *
114 * @var string
115 */
116 public $repetition_frequency_unit;
c3fc2621 117
e501603b
TO
118 /**
119 * Time interval for repeating the reminder.
120 *
121 * @var int unsigned
122 */
123 public $repetition_frequency_interval;
c3fc2621 124
e501603b
TO
125 /**
126 * Time units till repetition of reminder.
127 *
128 * @var string
129 */
130 public $end_frequency_unit;
c3fc2621 131
e501603b
TO
132 /**
133 * Time interval till repeating the reminder.
134 *
135 * @var int unsigned
136 */
137 public $end_frequency_interval;
c3fc2621 138
e501603b
TO
139 /**
140 * Reminder Action till repeating the reminder.
141 *
142 * @var string
143 */
144 public $end_action;
c3fc2621 145
e501603b
TO
146 /**
147 * Entity end date
148 *
149 * @var string
150 */
151 public $end_date;
c3fc2621 152
e501603b
TO
153 /**
154 * Is this option active?
155 *
156 * @var boolean
157 */
158 public $is_active;
c3fc2621 159
e501603b
TO
160 /**
161 * Contact IDs to which reminder should be sent.
162 *
163 * @var string
164 */
165 public $recipient_manual;
c3fc2621 166
e501603b
TO
167 /**
168 * listing based on recipient field.
169 *
170 * @var string
171 */
172 public $recipient_listing;
c3fc2621 173
e501603b
TO
174 /**
175 * Body of the mailing in text format.
176 *
177 * @var longtext
178 */
179 public $body_text;
c3fc2621 180
e501603b
TO
181 /**
182 * Body of the mailing in html format.
183 *
184 * @var longtext
185 */
186 public $body_html;
c3fc2621 187
e501603b
TO
188 /**
189 * Content of the SMS text.
190 *
191 * @var longtext
192 */
193 public $sms_body_text;
c3fc2621 194
e501603b
TO
195 /**
196 * Subject of mailing
197 *
198 * @var string
199 */
200 public $subject;
c3fc2621 201
e501603b
TO
202 /**
203 * Record Activity for this reminder?
204 *
205 * @var boolean
206 */
207 public $record_activity;
c3fc2621 208
e501603b
TO
209 /**
210 * Name/ID of the mapping to use on this table
211 *
212 * @var string
213 */
214 public $mapping_id;
c3fc2621 215
e501603b
TO
216 /**
217 * FK to Group
218 *
219 * @var int unsigned
220 */
221 public $group_id;
c3fc2621 222
e501603b
TO
223 /**
224 * FK to the message template.
225 *
226 * @var int unsigned
227 */
228 public $msg_template_id;
c3fc2621 229
e501603b
TO
230 /**
231 * FK to the message template.
232 *
233 * @var int unsigned
234 */
235 public $sms_template_id;
c3fc2621 236
e501603b
TO
237 /**
238 * Date on which the reminder be sent.
239 *
240 * @var date
241 */
242 public $absolute_date;
c3fc2621 243
e501603b
TO
244 /**
245 * Name in "from" field
246 *
247 * @var string
248 */
249 public $from_name;
c3fc2621 250
e501603b
TO
251 /**
252 * Email address in "from" field
253 *
254 * @var string
255 */
256 public $from_email;
c3fc2621 257
e501603b
TO
258 /**
259 * Send the message as email or sms or both.
260 *
261 * @var string
262 */
263 public $mode;
c3fc2621 264
e501603b 265 /**
e501603b
TO
266 * @var int unsigned
267 */
268 public $sms_provider_id;
c3fc2621 269
e501603b
TO
270 /**
271 * Used for repeating entity
272 *
273 * @var string
274 */
275 public $used_for;
c3fc2621 276
e501603b
TO
277 /**
278 * Used for multilingual installation
279 *
280 * @var string
281 */
282 public $filter_contact_language;
c3fc2621 283
e501603b
TO
284 /**
285 * Used for multilingual installation
286 *
287 * @var string
288 */
289 public $communication_language;
c3fc2621 290
e501603b 291 /**
f41f0342 292 * Class constructor.
e501603b 293 */
c3fc2621 294 public function __construct() {
e501603b
TO
295 $this->__table = 'civicrm_action_schedule';
296 parent::__construct();
297 }
c3fc2621 298
e501603b 299 /**
f41f0342 300 * Returns foreign keys and entity references.
e501603b
TO
301 *
302 * @return array
303 * [CRM_Core_Reference_Interface]
304 */
c3fc2621 305 public static function getReferenceColumns() {
346aaaba
TO
306 if (!isset(Civi::$statics[__CLASS__]['links'])) {
307 Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
c3fc2621
CW
308 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'group_id', 'civicrm_group', 'id');
309 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'msg_template_id', 'civicrm_msg_template', 'id');
310 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'sms_template_id', 'civicrm_msg_template', 'id');
311 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'sms_provider_id', 'civicrm_sms_provider', 'id');
346aaaba 312 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
e501603b 313 }
346aaaba 314 return Civi::$statics[__CLASS__]['links'];
e501603b 315 }
c3fc2621 316
e501603b
TO
317 /**
318 * Returns all the column names of this table
319 *
320 * @return array
321 */
c3fc2621 322 public static function &fields() {
346aaaba 323 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
c3fc2621
CW
324 Civi::$statics[__CLASS__]['fields'] = [
325 'id' => [
e501603b
TO
326 'name' => 'id',
327 'type' => CRM_Utils_Type::T_INT,
c3fc2621
CW
328 'title' => ts('Action Schedule ID'),
329 'required' => TRUE,
522a26c9 330 'table_name' => 'civicrm_action_schedule',
331 'entity' => 'ActionSchedule',
332 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 333 'localizable' => 0,
c3fc2621
CW
334 ],
335 'name' => [
e501603b
TO
336 'name' => 'name',
337 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 338 'title' => ts('Name'),
e501603b
TO
339 'description' => 'Name of the action(reminder)',
340 'maxlength' => 64,
341 'size' => CRM_Utils_Type::BIG,
522a26c9 342 'table_name' => 'civicrm_action_schedule',
343 'entity' => 'ActionSchedule',
344 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 345 'localizable' => 0,
c3fc2621
CW
346 ],
347 'title' => [
e501603b
TO
348 'name' => 'title',
349 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 350 'title' => ts('Title'),
e501603b
TO
351 'description' => 'Title of the action(reminder)',
352 'maxlength' => 64,
353 'size' => CRM_Utils_Type::BIG,
522a26c9 354 'table_name' => 'civicrm_action_schedule',
355 'entity' => 'ActionSchedule',
356 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 357 'localizable' => 0,
c3fc2621
CW
358 ],
359 'recipient' => [
e501603b
TO
360 'name' => 'recipient',
361 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 362 'title' => ts('Recipient'),
e501603b
TO
363 'description' => 'Recipient',
364 'maxlength' => 64,
365 'size' => CRM_Utils_Type::BIG,
522a26c9 366 'table_name' => 'civicrm_action_schedule',
367 'entity' => 'ActionSchedule',
368 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 369 'localizable' => 0,
c3fc2621
CW
370 ],
371 'limit_to' => [
e501603b
TO
372 'name' => 'limit_to',
373 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 374 'title' => ts('Limit To'),
e501603b 375 'description' => 'Is this the recipient criteria limited to OR in addition to?',
522a26c9 376 'table_name' => 'civicrm_action_schedule',
377 'entity' => 'ActionSchedule',
378 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 379 'localizable' => 0,
c3fc2621
CW
380 ],
381 'entity_value' => [
e501603b
TO
382 'name' => 'entity_value',
383 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 384 'title' => ts('Entity Value'),
e501603b
TO
385 'description' => 'Entity value',
386 'maxlength' => 255,
387 'size' => CRM_Utils_Type::HUGE,
522a26c9 388 'table_name' => 'civicrm_action_schedule',
389 'entity' => 'ActionSchedule',
390 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 391 'localizable' => 0,
c3fc2621
CW
392 ],
393 'entity_status' => [
e501603b
TO
394 'name' => 'entity_status',
395 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 396 'title' => ts('Entity Status'),
e501603b
TO
397 'description' => 'Entity status',
398 'maxlength' => 64,
399 'size' => CRM_Utils_Type::BIG,
522a26c9 400 'table_name' => 'civicrm_action_schedule',
401 'entity' => 'ActionSchedule',
402 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 403 'localizable' => 0,
c3fc2621
CW
404 ],
405 'start_action_offset' => [
e501603b
TO
406 'name' => 'start_action_offset',
407 'type' => CRM_Utils_Type::T_INT,
c3fc2621 408 'title' => ts('Start Action Offset'),
e501603b 409 'description' => 'Reminder Interval.',
522a26c9 410 'table_name' => 'civicrm_action_schedule',
411 'entity' => 'ActionSchedule',
412 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 413 'localizable' => 0,
c3fc2621
CW
414 ],
415 'start_action_unit' => [
e501603b
TO
416 'name' => 'start_action_unit',
417 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 418 'title' => ts('Start Action Unit'),
e501603b
TO
419 'description' => 'Time units for reminder.',
420 'maxlength' => 8,
421 'size' => CRM_Utils_Type::EIGHT,
522a26c9 422 'table_name' => 'civicrm_action_schedule',
423 'entity' => 'ActionSchedule',
424 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 425 'localizable' => 0,
c3fc2621 426 'html' => [
e501603b 427 'type' => 'Select',
c3fc2621
CW
428 ],
429 'pseudoconstant' => [
e501603b 430 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
c3fc2621
CW
431 ]
432 ],
433 'start_action_condition' => [
e501603b
TO
434 'name' => 'start_action_condition',
435 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 436 'title' => ts('Start Action Condition'),
e501603b 437 'description' => 'Reminder Action',
ed6e48d9 438 'maxlength' => 64,
439 'size' => CRM_Utils_Type::BIG,
522a26c9 440 'table_name' => 'civicrm_action_schedule',
441 'entity' => 'ActionSchedule',
442 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 443 'localizable' => 0,
c3fc2621
CW
444 ],
445 'start_action_date' => [
e501603b
TO
446 'name' => 'start_action_date',
447 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 448 'title' => ts('Start Action Date'),
e501603b
TO
449 'description' => 'Entity date',
450 'maxlength' => 64,
451 'size' => CRM_Utils_Type::BIG,
522a26c9 452 'table_name' => 'civicrm_action_schedule',
453 'entity' => 'ActionSchedule',
454 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 455 'localizable' => 0,
c3fc2621
CW
456 ],
457 'is_repeat' => [
e501603b
TO
458 'name' => 'is_repeat',
459 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 460 'title' => ts('Repeat?'),
522a26c9 461 'table_name' => 'civicrm_action_schedule',
462 'entity' => 'ActionSchedule',
463 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 464 'localizable' => 0,
c3fc2621
CW
465 ],
466 'repetition_frequency_unit' => [
e501603b
TO
467 'name' => 'repetition_frequency_unit',
468 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 469 'title' => ts('Repetition Frequency Unit'),
e501603b
TO
470 'description' => 'Time units for repetition of reminder.',
471 'maxlength' => 8,
472 'size' => CRM_Utils_Type::EIGHT,
522a26c9 473 'table_name' => 'civicrm_action_schedule',
474 'entity' => 'ActionSchedule',
475 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 476 'localizable' => 0,
c3fc2621 477 'html' => [
e501603b 478 'type' => 'Select',
c3fc2621
CW
479 ],
480 'pseudoconstant' => [
e501603b 481 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
c3fc2621
CW
482 ]
483 ],
484 'repetition_frequency_interval' => [
e501603b
TO
485 'name' => 'repetition_frequency_interval',
486 'type' => CRM_Utils_Type::T_INT,
c3fc2621 487 'title' => ts('Repetition Frequency Interval'),
e501603b 488 'description' => 'Time interval for repeating the reminder.',
522a26c9 489 'table_name' => 'civicrm_action_schedule',
490 'entity' => 'ActionSchedule',
491 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 492 'localizable' => 0,
c3fc2621
CW
493 ],
494 'end_frequency_unit' => [
e501603b
TO
495 'name' => 'end_frequency_unit',
496 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 497 'title' => ts('End Frequency Unit'),
e501603b
TO
498 'description' => 'Time units till repetition of reminder.',
499 'maxlength' => 8,
500 'size' => CRM_Utils_Type::EIGHT,
522a26c9 501 'table_name' => 'civicrm_action_schedule',
502 'entity' => 'ActionSchedule',
503 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 504 'localizable' => 0,
c3fc2621 505 'html' => [
e501603b 506 'type' => 'Select',
c3fc2621
CW
507 ],
508 'pseudoconstant' => [
e501603b 509 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
c3fc2621
CW
510 ]
511 ],
512 'end_frequency_interval' => [
e501603b
TO
513 'name' => 'end_frequency_interval',
514 'type' => CRM_Utils_Type::T_INT,
c3fc2621 515 'title' => ts('End Frequency Interval'),
e501603b 516 'description' => 'Time interval till repeating the reminder.',
522a26c9 517 'table_name' => 'civicrm_action_schedule',
518 'entity' => 'ActionSchedule',
519 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 520 'localizable' => 0,
c3fc2621
CW
521 ],
522 'end_action' => [
e501603b
TO
523 'name' => 'end_action',
524 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 525 'title' => ts('End Action'),
e501603b
TO
526 'description' => 'Reminder Action till repeating the reminder.',
527 'maxlength' => 32,
528 'size' => CRM_Utils_Type::MEDIUM,
522a26c9 529 'table_name' => 'civicrm_action_schedule',
530 'entity' => 'ActionSchedule',
531 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 532 'localizable' => 0,
c3fc2621
CW
533 ],
534 'end_date' => [
e501603b
TO
535 'name' => 'end_date',
536 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 537 'title' => ts('End Date'),
e501603b
TO
538 'description' => 'Entity end date',
539 'maxlength' => 64,
540 'size' => CRM_Utils_Type::BIG,
522a26c9 541 'table_name' => 'civicrm_action_schedule',
542 'entity' => 'ActionSchedule',
543 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 544 'localizable' => 0,
c3fc2621
CW
545 ],
546 'is_active' => [
e501603b
TO
547 'name' => 'is_active',
548 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 549 'title' => ts('Schedule is Active?'),
e501603b
TO
550 'description' => 'Is this option active?',
551 'default' => '1',
522a26c9 552 'table_name' => 'civicrm_action_schedule',
553 'entity' => 'ActionSchedule',
554 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 555 'localizable' => 0,
c3fc2621
CW
556 ],
557 'recipient_manual' => [
e501603b
TO
558 'name' => 'recipient_manual',
559 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 560 'title' => ts('Recipient Manual'),
e501603b
TO
561 'description' => 'Contact IDs to which reminder should be sent.',
562 'maxlength' => 128,
563 'size' => CRM_Utils_Type::HUGE,
522a26c9 564 'table_name' => 'civicrm_action_schedule',
565 'entity' => 'ActionSchedule',
566 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 567 'localizable' => 0,
c3fc2621
CW
568 ],
569 'recipient_listing' => [
e501603b
TO
570 'name' => 'recipient_listing',
571 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 572 'title' => ts('Recipient Listing'),
e501603b
TO
573 'description' => 'listing based on recipient field.',
574 'maxlength' => 128,
575 'size' => CRM_Utils_Type::HUGE,
522a26c9 576 'table_name' => 'civicrm_action_schedule',
577 'entity' => 'ActionSchedule',
578 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 579 'localizable' => 0,
c3fc2621
CW
580 ],
581 'body_text' => [
e501603b
TO
582 'name' => 'body_text',
583 'type' => CRM_Utils_Type::T_LONGTEXT,
c3fc2621 584 'title' => ts('Reminder Text'),
e501603b 585 'description' => 'Body of the mailing in text format.',
522a26c9 586 'table_name' => 'civicrm_action_schedule',
587 'entity' => 'ActionSchedule',
588 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 589 'localizable' => 0,
c3fc2621
CW
590 ],
591 'body_html' => [
e501603b
TO
592 'name' => 'body_html',
593 'type' => CRM_Utils_Type::T_LONGTEXT,
c3fc2621 594 'title' => ts('Reminder HTML'),
e501603b 595 'description' => 'Body of the mailing in html format.',
522a26c9 596 'table_name' => 'civicrm_action_schedule',
597 'entity' => 'ActionSchedule',
598 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 599 'localizable' => 0,
c3fc2621
CW
600 ],
601 'sms_body_text' => [
e501603b
TO
602 'name' => 'sms_body_text',
603 'type' => CRM_Utils_Type::T_LONGTEXT,
c3fc2621 604 'title' => ts('SMS Reminder Text'),
e501603b 605 'description' => 'Content of the SMS text.',
522a26c9 606 'table_name' => 'civicrm_action_schedule',
607 'entity' => 'ActionSchedule',
608 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 609 'localizable' => 0,
c3fc2621
CW
610 ],
611 'subject' => [
e501603b
TO
612 'name' => 'subject',
613 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 614 'title' => ts('Reminder Subject'),
e501603b
TO
615 'description' => 'Subject of mailing',
616 'maxlength' => 128,
617 'size' => CRM_Utils_Type::HUGE,
522a26c9 618 'table_name' => 'civicrm_action_schedule',
619 'entity' => 'ActionSchedule',
620 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 621 'localizable' => 0,
c3fc2621
CW
622 ],
623 'record_activity' => [
e501603b
TO
624 'name' => 'record_activity',
625 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 626 'title' => ts('Record Activity for Reminder?'),
e501603b
TO
627 'description' => 'Record Activity for this reminder?',
628 'default' => 'NULL',
522a26c9 629 'table_name' => 'civicrm_action_schedule',
630 'entity' => 'ActionSchedule',
631 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 632 'localizable' => 0,
c3fc2621
CW
633 ],
634 'mapping_id' => [
e501603b
TO
635 'name' => 'mapping_id',
636 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 637 'title' => ts('Reminder Mapping'),
e501603b
TO
638 'description' => 'Name/ID of the mapping to use on this table',
639 'maxlength' => 64,
640 'size' => CRM_Utils_Type::BIG,
522a26c9 641 'table_name' => 'civicrm_action_schedule',
642 'entity' => 'ActionSchedule',
643 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 644 'localizable' => 0,
c3fc2621
CW
645 ],
646 'group_id' => [
e501603b
TO
647 'name' => 'group_id',
648 'type' => CRM_Utils_Type::T_INT,
c3fc2621 649 'title' => ts('Reminder Group'),
e501603b 650 'description' => 'FK to Group',
522a26c9 651 'table_name' => 'civicrm_action_schedule',
652 'entity' => 'ActionSchedule',
653 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 654 'localizable' => 0,
e501603b 655 'FKClassName' => 'CRM_Contact_DAO_Group',
c3fc2621 656 'html' => [
e501603b 657 'type' => 'Select',
c3fc2621
CW
658 ],
659 'pseudoconstant' => [
e501603b
TO
660 'table' => 'civicrm_group',
661 'keyColumn' => 'id',
662 'labelColumn' => 'title',
c3fc2621
CW
663 ]
664 ],
665 'msg_template_id' => [
e501603b
TO
666 'name' => 'msg_template_id',
667 'type' => CRM_Utils_Type::T_INT,
c3fc2621 668 'title' => ts('Reminder Template'),
e501603b 669 'description' => 'FK to the message template.',
522a26c9 670 'table_name' => 'civicrm_action_schedule',
671 'entity' => 'ActionSchedule',
672 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 673 'localizable' => 0,
e501603b 674 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
c3fc2621
CW
675 ],
676 'sms_template_id' => [
e501603b
TO
677 'name' => 'sms_template_id',
678 'type' => CRM_Utils_Type::T_INT,
c3fc2621 679 'title' => ts('SMS Reminder Template'),
e501603b 680 'description' => 'FK to the message template.',
522a26c9 681 'table_name' => 'civicrm_action_schedule',
682 'entity' => 'ActionSchedule',
683 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 684 'localizable' => 0,
e501603b 685 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
c3fc2621
CW
686 ],
687 'absolute_date' => [
e501603b
TO
688 'name' => 'absolute_date',
689 'type' => CRM_Utils_Type::T_DATE,
c3fc2621 690 'title' => ts('Fixed Date for Reminder'),
e501603b 691 'description' => 'Date on which the reminder be sent.',
522a26c9 692 'table_name' => 'civicrm_action_schedule',
693 'entity' => 'ActionSchedule',
694 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 695 'localizable' => 0,
c3fc2621
CW
696 ],
697 'from_name' => [
e501603b
TO
698 'name' => 'from_name',
699 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 700 'title' => ts('Reminder from Name'),
e501603b
TO
701 'description' => 'Name in "from" field',
702 'maxlength' => 255,
703 'size' => CRM_Utils_Type::HUGE,
522a26c9 704 'table_name' => 'civicrm_action_schedule',
705 'entity' => 'ActionSchedule',
706 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 707 'localizable' => 0,
c3fc2621
CW
708 ],
709 'from_email' => [
e501603b
TO
710 'name' => 'from_email',
711 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 712 'title' => ts('Reminder From Email'),
e501603b
TO
713 'description' => 'Email address in "from" field',
714 'maxlength' => 255,
715 'size' => CRM_Utils_Type::HUGE,
522a26c9 716 'table_name' => 'civicrm_action_schedule',
717 'entity' => 'ActionSchedule',
718 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 719 'localizable' => 0,
c3fc2621
CW
720 ],
721 'mode' => [
e501603b
TO
722 'name' => 'mode',
723 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 724 'title' => ts('Message Mode'),
e501603b
TO
725 'description' => 'Send the message as email or sms or both.',
726 'maxlength' => 128,
727 'size' => CRM_Utils_Type::HUGE,
728 'default' => 'Email',
522a26c9 729 'table_name' => 'civicrm_action_schedule',
730 'entity' => 'ActionSchedule',
731 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 732 'localizable' => 0,
c3fc2621 733 'html' => [
e501603b 734 'type' => 'Select',
c3fc2621
CW
735 ],
736 'pseudoconstant' => [
e501603b
TO
737 'optionGroupName' => 'msg_mode',
738 'optionEditPath' => 'civicrm/admin/options/msg_mode',
c3fc2621
CW
739 ]
740 ],
741 'sms_provider_id' => [
e501603b
TO
742 'name' => 'sms_provider_id',
743 'type' => CRM_Utils_Type::T_INT,
c3fc2621 744 'title' => ts('SMS Provider'),
522a26c9 745 'table_name' => 'civicrm_action_schedule',
746 'entity' => 'ActionSchedule',
747 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 748 'localizable' => 0,
e501603b 749 'FKClassName' => 'CRM_SMS_DAO_Provider',
c3fc2621 750 'html' => [
e501603b 751 'type' => 'Select',
c3fc2621
CW
752 ],
753 ],
754 'used_for' => [
e501603b
TO
755 'name' => 'used_for',
756 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 757 'title' => ts('Used For'),
e501603b
TO
758 'description' => 'Used for repeating entity',
759 'maxlength' => 64,
760 'size' => CRM_Utils_Type::BIG,
522a26c9 761 'table_name' => 'civicrm_action_schedule',
762 'entity' => 'ActionSchedule',
763 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 764 'localizable' => 0,
c3fc2621
CW
765 ],
766 'filter_contact_language' => [
e501603b
TO
767 'name' => 'filter_contact_language',
768 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 769 'title' => ts('Filter Contact Language'),
e501603b
TO
770 'description' => 'Used for multilingual installation',
771 'maxlength' => 128,
772 'size' => CRM_Utils_Type::HUGE,
522a26c9 773 'table_name' => 'civicrm_action_schedule',
774 'entity' => 'ActionSchedule',
775 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 776 'localizable' => 0,
c3fc2621
CW
777 ],
778 'communication_language' => [
e501603b
TO
779 'name' => 'communication_language',
780 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 781 'title' => ts('Communication Language'),
e501603b
TO
782 'description' => 'Used for multilingual installation',
783 'maxlength' => 8,
784 'size' => CRM_Utils_Type::EIGHT,
522a26c9 785 'table_name' => 'civicrm_action_schedule',
786 'entity' => 'ActionSchedule',
787 'bao' => 'CRM_Core_BAO_ActionSchedule',
6a7e5e5d 788 'localizable' => 0,
c3fc2621
CW
789 ],
790 ];
346aaaba 791 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 792 }
346aaaba 793 return Civi::$statics[__CLASS__]['fields'];
e501603b 794 }
c3fc2621 795
e501603b 796 /**
bd8e0b14 797 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
798 *
799 * @return array
bd8e0b14 800 * Array(string $name => string $uniqueName).
e501603b 801 */
c3fc2621 802 public static function &fieldKeys() {
bd8e0b14
TO
803 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
804 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 805 }
bd8e0b14 806 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b 807 }
c3fc2621 808
e501603b
TO
809 /**
810 * Returns the names of this table
811 *
812 * @return string
813 */
c3fc2621 814 public static function getTableName() {
e501603b
TO
815 return self::$_tableName;
816 }
c3fc2621 817
e501603b
TO
818 /**
819 * Returns if this table needs to be logged
820 *
c3fc2621 821 * @return bool
e501603b 822 */
c3fc2621 823 public function getLog() {
e501603b
TO
824 return self::$_log;
825 }
c3fc2621 826
e501603b
TO
827 /**
828 * Returns the list of fields that can be imported
829 *
830 * @param bool $prefix
831 *
832 * @return array
833 */
c3fc2621
CW
834 public static function &import($prefix = FALSE) {
835 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'action_schedule', $prefix, []);
60808919 836 return $r;
e501603b 837 }
c3fc2621 838
e501603b
TO
839 /**
840 * Returns the list of fields that can be exported
841 *
842 * @param bool $prefix
843 *
844 * @return array
845 */
c3fc2621
CW
846 public static function &export($prefix = FALSE) {
847 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'action_schedule', $prefix, []);
60808919 848 return $r;
e501603b 849 }
c3fc2621 850
e7a6b91a
AS
851 /**
852 * Returns the list of indices
c3fc2621
CW
853 *
854 * @param bool $localize
855 *
856 * @return array
e7a6b91a
AS
857 */
858 public static function indices($localize = TRUE) {
c3fc2621 859 $indices = [];
e7a6b91a
AS
860 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
861 }
c3fc2621 862
e501603b 863}