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