API/DAO Metadata - Retain versioning metadata for possible usage in runtime+tooling
[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:4493f5d18b2b452d4a6b9ee4e15a15bf)
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 localized title of this entity.
301 */
302 public static function getEntityTitle() {
303 return ts('Action Schedules');
304 }
305
306 /**
307 * Returns foreign keys and entity references.
308 *
309 * @return array
310 * [CRM_Core_Reference_Interface]
311 */
312 public static function getReferenceColumns() {
313 if (!isset(Civi::$statics[__CLASS__]['links'])) {
314 Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
315 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'group_id', 'civicrm_group', 'id');
316 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'msg_template_id', 'civicrm_msg_template', 'id');
317 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'sms_template_id', 'civicrm_msg_template', 'id');
318 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'sms_provider_id', 'civicrm_sms_provider', 'id');
319 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
320 }
321 return Civi::$statics[__CLASS__]['links'];
322 }
323
324 /**
325 * Returns all the column names of this table
326 *
327 * @return array
328 */
329 public static function &fields() {
330 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
331 Civi::$statics[__CLASS__]['fields'] = [
332 'id' => [
333 'name' => 'id',
334 'type' => CRM_Utils_Type::T_INT,
335 'title' => ts('Action Schedule ID'),
336 'required' => TRUE,
337 'where' => 'civicrm_action_schedule.id',
338 'table_name' => 'civicrm_action_schedule',
339 'entity' => 'ActionSchedule',
340 'bao' => 'CRM_Core_BAO_ActionSchedule',
341 'localizable' => 0,
342 'add' => '3.4',
343 ],
344 'name' => [
345 'name' => 'name',
346 'type' => CRM_Utils_Type::T_STRING,
347 'title' => ts('Name'),
348 'description' => ts('Name of the action(reminder)'),
349 'maxlength' => 64,
350 'size' => CRM_Utils_Type::BIG,
351 'where' => 'civicrm_action_schedule.name',
352 'table_name' => 'civicrm_action_schedule',
353 'entity' => 'ActionSchedule',
354 'bao' => 'CRM_Core_BAO_ActionSchedule',
355 'localizable' => 0,
356 'add' => '3.4',
357 ],
358 'title' => [
359 'name' => 'title',
360 'type' => CRM_Utils_Type::T_STRING,
361 'title' => ts('Title'),
362 'description' => ts('Title of the action(reminder)'),
363 'maxlength' => 64,
364 'size' => CRM_Utils_Type::BIG,
365 'where' => 'civicrm_action_schedule.title',
366 'table_name' => 'civicrm_action_schedule',
367 'entity' => 'ActionSchedule',
368 'bao' => 'CRM_Core_BAO_ActionSchedule',
369 'localizable' => 0,
370 'add' => '3.4',
371 ],
372 'recipient' => [
373 'name' => 'recipient',
374 'type' => CRM_Utils_Type::T_STRING,
375 'title' => ts('Recipient'),
376 'description' => ts('Recipient'),
377 'maxlength' => 64,
378 'size' => CRM_Utils_Type::BIG,
379 'where' => 'civicrm_action_schedule.recipient',
380 'table_name' => 'civicrm_action_schedule',
381 'entity' => 'ActionSchedule',
382 'bao' => 'CRM_Core_BAO_ActionSchedule',
383 'localizable' => 0,
384 'add' => '3.4',
385 ],
386 'limit_to' => [
387 'name' => 'limit_to',
388 'type' => CRM_Utils_Type::T_BOOLEAN,
389 'title' => ts('Limit To'),
390 'description' => ts('Is this the recipient criteria limited to OR in addition to?'),
391 'where' => 'civicrm_action_schedule.limit_to',
392 'table_name' => 'civicrm_action_schedule',
393 'entity' => 'ActionSchedule',
394 'bao' => 'CRM_Core_BAO_ActionSchedule',
395 'localizable' => 0,
396 'add' => '4.4',
397 ],
398 'entity_value' => [
399 'name' => 'entity_value',
400 'type' => CRM_Utils_Type::T_STRING,
401 'title' => ts('Entity Value'),
402 'description' => ts('Entity value'),
403 'maxlength' => 255,
404 'size' => CRM_Utils_Type::HUGE,
405 'where' => 'civicrm_action_schedule.entity_value',
406 'table_name' => 'civicrm_action_schedule',
407 'entity' => 'ActionSchedule',
408 'bao' => 'CRM_Core_BAO_ActionSchedule',
409 'localizable' => 0,
410 'add' => '3.4',
411 ],
412 'entity_status' => [
413 'name' => 'entity_status',
414 'type' => CRM_Utils_Type::T_STRING,
415 'title' => ts('Entity Status'),
416 'description' => ts('Entity status'),
417 'maxlength' => 64,
418 'size' => CRM_Utils_Type::BIG,
419 'where' => 'civicrm_action_schedule.entity_status',
420 'table_name' => 'civicrm_action_schedule',
421 'entity' => 'ActionSchedule',
422 'bao' => 'CRM_Core_BAO_ActionSchedule',
423 'localizable' => 0,
424 'add' => '3.4',
425 ],
426 'start_action_offset' => [
427 'name' => 'start_action_offset',
428 'type' => CRM_Utils_Type::T_INT,
429 'title' => ts('Start Action Offset'),
430 'description' => ts('Reminder Interval.'),
431 'where' => 'civicrm_action_schedule.start_action_offset',
432 'default' => '0',
433 'table_name' => 'civicrm_action_schedule',
434 'entity' => 'ActionSchedule',
435 'bao' => 'CRM_Core_BAO_ActionSchedule',
436 'localizable' => 0,
437 'add' => '3.4',
438 ],
439 'start_action_unit' => [
440 'name' => 'start_action_unit',
441 'type' => CRM_Utils_Type::T_STRING,
442 'title' => ts('Start Action Unit'),
443 'description' => ts('Time units for reminder.'),
444 'maxlength' => 8,
445 'size' => CRM_Utils_Type::EIGHT,
446 'where' => 'civicrm_action_schedule.start_action_unit',
447 'table_name' => 'civicrm_action_schedule',
448 'entity' => 'ActionSchedule',
449 'bao' => 'CRM_Core_BAO_ActionSchedule',
450 'localizable' => 0,
451 'html' => [
452 'type' => 'Select',
453 ],
454 'pseudoconstant' => [
455 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
456 ],
457 'add' => '3.4',
458 ],
459 'start_action_condition' => [
460 'name' => 'start_action_condition',
461 'type' => CRM_Utils_Type::T_STRING,
462 'title' => ts('Start Action Condition'),
463 'description' => ts('Reminder Action'),
464 'maxlength' => 64,
465 'size' => CRM_Utils_Type::BIG,
466 'where' => 'civicrm_action_schedule.start_action_condition',
467 'table_name' => 'civicrm_action_schedule',
468 'entity' => 'ActionSchedule',
469 'bao' => 'CRM_Core_BAO_ActionSchedule',
470 'localizable' => 0,
471 'add' => '3.4',
472 ],
473 'start_action_date' => [
474 'name' => 'start_action_date',
475 'type' => CRM_Utils_Type::T_STRING,
476 'title' => ts('Start Action Date'),
477 'description' => ts('Entity date'),
478 'maxlength' => 64,
479 'size' => CRM_Utils_Type::BIG,
480 'where' => 'civicrm_action_schedule.start_action_date',
481 'table_name' => 'civicrm_action_schedule',
482 'entity' => 'ActionSchedule',
483 'bao' => 'CRM_Core_BAO_ActionSchedule',
484 'localizable' => 0,
485 'add' => '3.4',
486 ],
487 'is_repeat' => [
488 'name' => 'is_repeat',
489 'type' => CRM_Utils_Type::T_BOOLEAN,
490 'title' => ts('Repeat?'),
491 'where' => 'civicrm_action_schedule.is_repeat',
492 'default' => '0',
493 'table_name' => 'civicrm_action_schedule',
494 'entity' => 'ActionSchedule',
495 'bao' => 'CRM_Core_BAO_ActionSchedule',
496 'localizable' => 0,
497 'add' => '3.4',
498 ],
499 'repetition_frequency_unit' => [
500 'name' => 'repetition_frequency_unit',
501 'type' => CRM_Utils_Type::T_STRING,
502 'title' => ts('Repetition Frequency Unit'),
503 'description' => ts('Time units for repetition of reminder.'),
504 'maxlength' => 8,
505 'size' => CRM_Utils_Type::EIGHT,
506 'where' => 'civicrm_action_schedule.repetition_frequency_unit',
507 'table_name' => 'civicrm_action_schedule',
508 'entity' => 'ActionSchedule',
509 'bao' => 'CRM_Core_BAO_ActionSchedule',
510 'localizable' => 0,
511 'html' => [
512 'type' => 'Select',
513 ],
514 'pseudoconstant' => [
515 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
516 ],
517 'add' => '3.4',
518 ],
519 'repetition_frequency_interval' => [
520 'name' => 'repetition_frequency_interval',
521 'type' => CRM_Utils_Type::T_INT,
522 'title' => ts('Repetition Frequency Interval'),
523 'description' => ts('Time interval for repeating the reminder.'),
524 'where' => 'civicrm_action_schedule.repetition_frequency_interval',
525 'default' => '0',
526 'table_name' => 'civicrm_action_schedule',
527 'entity' => 'ActionSchedule',
528 'bao' => 'CRM_Core_BAO_ActionSchedule',
529 'localizable' => 0,
530 'add' => '3.4',
531 ],
532 'end_frequency_unit' => [
533 'name' => 'end_frequency_unit',
534 'type' => CRM_Utils_Type::T_STRING,
535 'title' => ts('End Frequency Unit'),
536 'description' => ts('Time units till repetition of reminder.'),
537 'maxlength' => 8,
538 'size' => CRM_Utils_Type::EIGHT,
539 'where' => 'civicrm_action_schedule.end_frequency_unit',
540 'table_name' => 'civicrm_action_schedule',
541 'entity' => 'ActionSchedule',
542 'bao' => 'CRM_Core_BAO_ActionSchedule',
543 'localizable' => 0,
544 'html' => [
545 'type' => 'Select',
546 ],
547 'pseudoconstant' => [
548 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
549 ],
550 'add' => '3.4',
551 ],
552 'end_frequency_interval' => [
553 'name' => 'end_frequency_interval',
554 'type' => CRM_Utils_Type::T_INT,
555 'title' => ts('End Frequency Interval'),
556 'description' => ts('Time interval till repeating the reminder.'),
557 'where' => 'civicrm_action_schedule.end_frequency_interval',
558 'default' => '0',
559 'table_name' => 'civicrm_action_schedule',
560 'entity' => 'ActionSchedule',
561 'bao' => 'CRM_Core_BAO_ActionSchedule',
562 'localizable' => 0,
563 'add' => '3.4',
564 ],
565 'end_action' => [
566 'name' => 'end_action',
567 'type' => CRM_Utils_Type::T_STRING,
568 'title' => ts('End Action'),
569 'description' => ts('Reminder Action till repeating the reminder.'),
570 'maxlength' => 32,
571 'size' => CRM_Utils_Type::MEDIUM,
572 'where' => 'civicrm_action_schedule.end_action',
573 'table_name' => 'civicrm_action_schedule',
574 'entity' => 'ActionSchedule',
575 'bao' => 'CRM_Core_BAO_ActionSchedule',
576 'localizable' => 0,
577 'add' => '3.4',
578 ],
579 'end_date' => [
580 'name' => 'end_date',
581 'type' => CRM_Utils_Type::T_STRING,
582 'title' => ts('End Date'),
583 'description' => ts('Entity end date'),
584 'maxlength' => 64,
585 'size' => CRM_Utils_Type::BIG,
586 'where' => 'civicrm_action_schedule.end_date',
587 'table_name' => 'civicrm_action_schedule',
588 'entity' => 'ActionSchedule',
589 'bao' => 'CRM_Core_BAO_ActionSchedule',
590 'localizable' => 0,
591 'add' => '3.4',
592 ],
593 'is_active' => [
594 'name' => 'is_active',
595 'type' => CRM_Utils_Type::T_BOOLEAN,
596 'title' => ts('Schedule is Active?'),
597 'description' => ts('Is this option active?'),
598 'where' => 'civicrm_action_schedule.is_active',
599 'default' => '1',
600 'table_name' => 'civicrm_action_schedule',
601 'entity' => 'ActionSchedule',
602 'bao' => 'CRM_Core_BAO_ActionSchedule',
603 'localizable' => 0,
604 'add' => '3.4',
605 ],
606 'recipient_manual' => [
607 'name' => 'recipient_manual',
608 'type' => CRM_Utils_Type::T_STRING,
609 'title' => ts('Recipient Manual'),
610 'description' => ts('Contact IDs to which reminder should be sent.'),
611 'maxlength' => 128,
612 'size' => CRM_Utils_Type::HUGE,
613 'where' => 'civicrm_action_schedule.recipient_manual',
614 'table_name' => 'civicrm_action_schedule',
615 'entity' => 'ActionSchedule',
616 'bao' => 'CRM_Core_BAO_ActionSchedule',
617 'localizable' => 0,
618 'add' => '3.4',
619 ],
620 'recipient_listing' => [
621 'name' => 'recipient_listing',
622 'type' => CRM_Utils_Type::T_STRING,
623 'title' => ts('Recipient Listing'),
624 'description' => ts('listing based on recipient field.'),
625 'maxlength' => 128,
626 'size' => CRM_Utils_Type::HUGE,
627 'where' => 'civicrm_action_schedule.recipient_listing',
628 'table_name' => 'civicrm_action_schedule',
629 'entity' => 'ActionSchedule',
630 'bao' => 'CRM_Core_BAO_ActionSchedule',
631 'localizable' => 0,
632 'add' => '4.1',
633 ],
634 'body_text' => [
635 'name' => 'body_text',
636 'type' => CRM_Utils_Type::T_LONGTEXT,
637 'title' => ts('Reminder Text'),
638 'description' => ts('Body of the mailing in text format.'),
639 'where' => 'civicrm_action_schedule.body_text',
640 'table_name' => 'civicrm_action_schedule',
641 'entity' => 'ActionSchedule',
642 'bao' => 'CRM_Core_BAO_ActionSchedule',
643 'localizable' => 0,
644 'add' => '3.4',
645 ],
646 'body_html' => [
647 'name' => 'body_html',
648 'type' => CRM_Utils_Type::T_LONGTEXT,
649 'title' => ts('Reminder HTML'),
650 'description' => ts('Body of the mailing in html format.'),
651 'where' => 'civicrm_action_schedule.body_html',
652 'table_name' => 'civicrm_action_schedule',
653 'entity' => 'ActionSchedule',
654 'bao' => 'CRM_Core_BAO_ActionSchedule',
655 'localizable' => 0,
656 'add' => '3.4',
657 ],
658 'sms_body_text' => [
659 'name' => 'sms_body_text',
660 'type' => CRM_Utils_Type::T_LONGTEXT,
661 'title' => ts('SMS Reminder Text'),
662 'description' => ts('Content of the SMS text.'),
663 'where' => 'civicrm_action_schedule.sms_body_text',
664 'table_name' => 'civicrm_action_schedule',
665 'entity' => 'ActionSchedule',
666 'bao' => 'CRM_Core_BAO_ActionSchedule',
667 'localizable' => 0,
668 'add' => '4.5',
669 ],
670 'subject' => [
671 'name' => 'subject',
672 'type' => CRM_Utils_Type::T_STRING,
673 'title' => ts('Reminder Subject'),
674 'description' => ts('Subject of mailing'),
675 'maxlength' => 128,
676 'size' => CRM_Utils_Type::HUGE,
677 'where' => 'civicrm_action_schedule.subject',
678 'table_name' => 'civicrm_action_schedule',
679 'entity' => 'ActionSchedule',
680 'bao' => 'CRM_Core_BAO_ActionSchedule',
681 'localizable' => 0,
682 'add' => '3.4',
683 ],
684 'record_activity' => [
685 'name' => 'record_activity',
686 'type' => CRM_Utils_Type::T_BOOLEAN,
687 'title' => ts('Record Activity for Reminder?'),
688 'description' => ts('Record Activity for this reminder?'),
689 'where' => 'civicrm_action_schedule.record_activity',
690 'default' => 'NULL',
691 'table_name' => 'civicrm_action_schedule',
692 'entity' => 'ActionSchedule',
693 'bao' => 'CRM_Core_BAO_ActionSchedule',
694 'localizable' => 0,
695 'add' => '3.4',
696 ],
697 'mapping_id' => [
698 'name' => 'mapping_id',
699 'type' => CRM_Utils_Type::T_STRING,
700 'title' => ts('Reminder Mapping'),
701 'description' => ts('Name/ID of the mapping to use on this table'),
702 'maxlength' => 64,
703 'size' => CRM_Utils_Type::BIG,
704 'where' => 'civicrm_action_schedule.mapping_id',
705 'table_name' => 'civicrm_action_schedule',
706 'entity' => 'ActionSchedule',
707 'bao' => 'CRM_Core_BAO_ActionSchedule',
708 'localizable' => 0,
709 'add' => '3.4',
710 ],
711 'group_id' => [
712 'name' => 'group_id',
713 'type' => CRM_Utils_Type::T_INT,
714 'title' => ts('Reminder Group'),
715 'description' => ts('FK to Group'),
716 'where' => 'civicrm_action_schedule.group_id',
717 'table_name' => 'civicrm_action_schedule',
718 'entity' => 'ActionSchedule',
719 'bao' => 'CRM_Core_BAO_ActionSchedule',
720 'localizable' => 0,
721 'FKClassName' => 'CRM_Contact_DAO_Group',
722 'html' => [
723 'type' => 'Select',
724 ],
725 'pseudoconstant' => [
726 'table' => 'civicrm_group',
727 'keyColumn' => 'id',
728 'labelColumn' => 'title',
729 ],
730 'add' => '3.4',
731 ],
732 'msg_template_id' => [
733 'name' => 'msg_template_id',
734 'type' => CRM_Utils_Type::T_INT,
735 'title' => ts('Reminder Template'),
736 'description' => ts('FK to the message template.'),
737 'where' => 'civicrm_action_schedule.msg_template_id',
738 'table_name' => 'civicrm_action_schedule',
739 'entity' => 'ActionSchedule',
740 'bao' => 'CRM_Core_BAO_ActionSchedule',
741 'localizable' => 0,
742 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
743 'add' => NULL,
744 ],
745 'sms_template_id' => [
746 'name' => 'sms_template_id',
747 'type' => CRM_Utils_Type::T_INT,
748 'title' => ts('SMS Reminder Template'),
749 'description' => ts('FK to the message template.'),
750 'where' => 'civicrm_action_schedule.sms_template_id',
751 'table_name' => 'civicrm_action_schedule',
752 'entity' => 'ActionSchedule',
753 'bao' => 'CRM_Core_BAO_ActionSchedule',
754 'localizable' => 0,
755 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
756 'add' => NULL,
757 ],
758 'absolute_date' => [
759 'name' => 'absolute_date',
760 'type' => CRM_Utils_Type::T_DATE,
761 'title' => ts('Fixed Date for Reminder'),
762 'description' => ts('Date on which the reminder be sent.'),
763 'where' => 'civicrm_action_schedule.absolute_date',
764 'table_name' => 'civicrm_action_schedule',
765 'entity' => 'ActionSchedule',
766 'bao' => 'CRM_Core_BAO_ActionSchedule',
767 'localizable' => 0,
768 'add' => '4.1',
769 ],
770 'from_name' => [
771 'name' => 'from_name',
772 'type' => CRM_Utils_Type::T_STRING,
773 'title' => ts('Reminder from Name'),
774 'description' => ts('Name in "from" field'),
775 'maxlength' => 255,
776 'size' => CRM_Utils_Type::HUGE,
777 'where' => 'civicrm_action_schedule.from_name',
778 'table_name' => 'civicrm_action_schedule',
779 'entity' => 'ActionSchedule',
780 'bao' => 'CRM_Core_BAO_ActionSchedule',
781 'localizable' => 0,
782 'add' => '4.5',
783 ],
784 'from_email' => [
785 'name' => 'from_email',
786 'type' => CRM_Utils_Type::T_STRING,
787 'title' => ts('Reminder From Email'),
788 'description' => ts('Email address in "from" field'),
789 'maxlength' => 255,
790 'size' => CRM_Utils_Type::HUGE,
791 'where' => 'civicrm_action_schedule.from_email',
792 'table_name' => 'civicrm_action_schedule',
793 'entity' => 'ActionSchedule',
794 'bao' => 'CRM_Core_BAO_ActionSchedule',
795 'localizable' => 0,
796 'add' => '4.5',
797 ],
798 'mode' => [
799 'name' => 'mode',
800 'type' => CRM_Utils_Type::T_STRING,
801 'title' => ts('Message Mode'),
802 'description' => ts('Send the message as email or sms or both.'),
803 'maxlength' => 128,
804 'size' => CRM_Utils_Type::HUGE,
805 'where' => 'civicrm_action_schedule.mode',
806 'default' => 'Email',
807 'table_name' => 'civicrm_action_schedule',
808 'entity' => 'ActionSchedule',
809 'bao' => 'CRM_Core_BAO_ActionSchedule',
810 'localizable' => 0,
811 'html' => [
812 'type' => 'Select',
813 ],
814 'pseudoconstant' => [
815 'optionGroupName' => 'msg_mode',
816 'optionEditPath' => 'civicrm/admin/options/msg_mode',
817 ],
818 'add' => '4.5',
819 ],
820 'sms_provider_id' => [
821 'name' => 'sms_provider_id',
822 'type' => CRM_Utils_Type::T_INT,
823 'title' => ts('SMS Provider'),
824 'where' => 'civicrm_action_schedule.sms_provider_id',
825 'table_name' => 'civicrm_action_schedule',
826 'entity' => 'ActionSchedule',
827 'bao' => 'CRM_Core_BAO_ActionSchedule',
828 'localizable' => 0,
829 'FKClassName' => 'CRM_SMS_DAO_Provider',
830 'html' => [
831 'type' => 'Select',
832 ],
833 'add' => '4.5',
834 ],
835 'used_for' => [
836 'name' => 'used_for',
837 'type' => CRM_Utils_Type::T_STRING,
838 'title' => ts('Used For'),
839 'description' => ts('Used for repeating entity'),
840 'maxlength' => 64,
841 'size' => CRM_Utils_Type::BIG,
842 'where' => 'civicrm_action_schedule.used_for',
843 'table_name' => 'civicrm_action_schedule',
844 'entity' => 'ActionSchedule',
845 'bao' => 'CRM_Core_BAO_ActionSchedule',
846 'localizable' => 0,
847 'add' => '4.6',
848 ],
849 'filter_contact_language' => [
850 'name' => 'filter_contact_language',
851 'type' => CRM_Utils_Type::T_STRING,
852 'title' => ts('Filter Contact Language'),
853 'description' => ts('Used for multilingual installation'),
854 'maxlength' => 128,
855 'size' => CRM_Utils_Type::HUGE,
856 'where' => 'civicrm_action_schedule.filter_contact_language',
857 'table_name' => 'civicrm_action_schedule',
858 'entity' => 'ActionSchedule',
859 'bao' => 'CRM_Core_BAO_ActionSchedule',
860 'localizable' => 0,
861 'add' => '4.7',
862 ],
863 'communication_language' => [
864 'name' => 'communication_language',
865 'type' => CRM_Utils_Type::T_STRING,
866 'title' => ts('Communication Language'),
867 'description' => ts('Used for multilingual installation'),
868 'maxlength' => 8,
869 'size' => CRM_Utils_Type::EIGHT,
870 'where' => 'civicrm_action_schedule.communication_language',
871 'table_name' => 'civicrm_action_schedule',
872 'entity' => 'ActionSchedule',
873 'bao' => 'CRM_Core_BAO_ActionSchedule',
874 'localizable' => 0,
875 'add' => '4.7',
876 ],
877 ];
878 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
879 }
880 return Civi::$statics[__CLASS__]['fields'];
881 }
882
883 /**
884 * Return a mapping from field-name to the corresponding key (as used in fields()).
885 *
886 * @return array
887 * Array(string $name => string $uniqueName).
888 */
889 public static function &fieldKeys() {
890 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
891 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
892 }
893 return Civi::$statics[__CLASS__]['fieldKeys'];
894 }
895
896 /**
897 * Returns the names of this table
898 *
899 * @return string
900 */
901 public static function getTableName() {
902 return self::$_tableName;
903 }
904
905 /**
906 * Returns if this table needs to be logged
907 *
908 * @return bool
909 */
910 public function getLog() {
911 return self::$_log;
912 }
913
914 /**
915 * Returns the list of fields that can be imported
916 *
917 * @param bool $prefix
918 *
919 * @return array
920 */
921 public static function &import($prefix = FALSE) {
922 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'action_schedule', $prefix, []);
923 return $r;
924 }
925
926 /**
927 * Returns the list of fields that can be exported
928 *
929 * @param bool $prefix
930 *
931 * @return array
932 */
933 public static function &export($prefix = FALSE) {
934 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'action_schedule', $prefix, []);
935 return $r;
936 }
937
938 /**
939 * Returns the list of indices
940 *
941 * @param bool $localize
942 *
943 * @return array
944 */
945 public static function indices($localize = TRUE) {
946 $indices = [];
947 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
948 }
949
950 }