5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Core/ActionSchedule.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:444acdd7b222ed9f593b0b84aebfb763)
13 * Database access object for the ActionSchedule entity.
15 class CRM_Core_DAO_ActionSchedule
extends CRM_Core_DAO
{
16 const EXT
= 'civicrm';
17 const TABLE_ADDED
= '3.4';
20 * Static instance to hold the table name.
24 public static $_tableName = 'civicrm_action_schedule';
27 * Should CiviCRM log any modifications to this table in the civicrm_log table.
31 public static $_log = FALSE;
34 * @var int|string|null
35 * (SQL type: int unsigned)
36 * Note that values will be retrieved from the database as a string.
41 * Name of the action(reminder)
44 * (SQL type: varchar(64))
45 * Note that values will be retrieved from the database as a string.
50 * Title of the action(reminder)
53 * (SQL type: varchar(64))
54 * Note that values will be retrieved from the database as a string.
62 * (SQL type: varchar(64))
63 * Note that values will be retrieved from the database as a string.
68 * Is this the recipient criteria limited to OR in addition to?
72 * Note that values will be retrieved from the database as a string.
80 * (SQL type: varchar(255))
81 * Note that values will be retrieved from the database as a string.
89 * (SQL type: varchar(64))
90 * Note that values will be retrieved from the database as a string.
92 public $entity_status;
97 * @var int|string|null
98 * (SQL type: int unsigned)
99 * Note that values will be retrieved from the database as a string.
101 public $start_action_offset;
104 * Time units for reminder.
107 * (SQL type: varchar(8))
108 * Note that values will be retrieved from the database as a string.
110 public $start_action_unit;
116 * (SQL type: varchar(64))
117 * Note that values will be retrieved from the database as a string.
119 public $start_action_condition;
125 * (SQL type: varchar(64))
126 * Note that values will be retrieved from the database as a string.
128 public $start_action_date;
132 * (SQL type: tinyint)
133 * Note that values will be retrieved from the database as a string.
138 * Time units for repetition of reminder.
141 * (SQL type: varchar(8))
142 * Note that values will be retrieved from the database as a string.
144 public $repetition_frequency_unit;
147 * Time interval for repeating the reminder.
149 * @var int|string|null
150 * (SQL type: int unsigned)
151 * Note that values will be retrieved from the database as a string.
153 public $repetition_frequency_interval;
156 * Time units till repetition of reminder.
159 * (SQL type: varchar(8))
160 * Note that values will be retrieved from the database as a string.
162 public $end_frequency_unit;
165 * Time interval till repeating the reminder.
167 * @var int|string|null
168 * (SQL type: int unsigned)
169 * Note that values will be retrieved from the database as a string.
171 public $end_frequency_interval;
174 * Reminder Action till repeating the reminder.
177 * (SQL type: varchar(32))
178 * Note that values will be retrieved from the database as a string.
186 * (SQL type: varchar(64))
187 * Note that values will be retrieved from the database as a string.
192 * Is this option active?
195 * (SQL type: tinyint)
196 * Note that values will be retrieved from the database as a string.
201 * Contact IDs to which reminder should be sent.
204 * (SQL type: varchar(128))
205 * Note that values will be retrieved from the database as a string.
207 public $recipient_manual;
210 * listing based on recipient field.
213 * (SQL type: varchar(128))
214 * Note that values will be retrieved from the database as a string.
216 public $recipient_listing;
219 * Body of the mailing in text format.
222 * (SQL type: longtext)
223 * Note that values will be retrieved from the database as a string.
228 * Body of the mailing in html format.
231 * (SQL type: longtext)
232 * Note that values will be retrieved from the database as a string.
237 * Content of the SMS text.
240 * (SQL type: longtext)
241 * Note that values will be retrieved from the database as a string.
243 public $sms_body_text;
249 * (SQL type: varchar(128))
250 * Note that values will be retrieved from the database as a string.
255 * Record Activity for this reminder?
258 * (SQL type: tinyint)
259 * Note that values will be retrieved from the database as a string.
261 public $record_activity;
264 * Name/ID of the mapping to use on this table
267 * (SQL type: varchar(64))
268 * Note that values will be retrieved from the database as a string.
275 * @var int|string|null
276 * (SQL type: int unsigned)
277 * Note that values will be retrieved from the database as a string.
282 * FK to the message template.
284 * @var int|string|null
285 * (SQL type: int unsigned)
286 * Note that values will be retrieved from the database as a string.
288 public $msg_template_id;
291 * FK to the message template.
293 * @var int|string|null
294 * (SQL type: int unsigned)
295 * Note that values will be retrieved from the database as a string.
297 public $sms_template_id;
300 * Date on which the reminder be sent.
304 * Note that values will be retrieved from the database as a string.
306 public $absolute_date;
309 * Name in "from" field
312 * (SQL type: varchar(255))
313 * Note that values will be retrieved from the database as a string.
318 * Email address in "from" field
321 * (SQL type: varchar(255))
322 * Note that values will be retrieved from the database as a string.
327 * Send the message as email or sms or both.
330 * (SQL type: varchar(128))
331 * Note that values will be retrieved from the database as a string.
336 * @var int|string|null
337 * (SQL type: int unsigned)
338 * Note that values will be retrieved from the database as a string.
340 public $sms_provider_id;
343 * Used for repeating entity
346 * (SQL type: varchar(64))
347 * Note that values will be retrieved from the database as a string.
352 * Used for multilingual installation
355 * (SQL type: varchar(128))
356 * Note that values will be retrieved from the database as a string.
358 public $filter_contact_language;
361 * Used for multilingual installation
364 * (SQL type: varchar(8))
365 * Note that values will be retrieved from the database as a string.
367 public $communication_language;
370 * When was the scheduled reminder created.
373 * (SQL type: timestamp)
374 * Note that values will be retrieved from the database as a string.
376 public $created_date;
379 * When the reminder was created or modified.
382 * (SQL type: timestamp)
383 * Note that values will be retrieved from the database as a string.
385 public $modified_date;
388 * Earliest date to consider start events from.
391 * (SQL type: timestamp)
392 * Note that values will be retrieved from the database as a string.
394 public $effective_start_date;
397 * Latest date to consider end events from.
400 * (SQL type: timestamp)
401 * Note that values will be retrieved from the database as a string.
403 public $effective_end_date;
408 public function __construct() {
409 $this->__table
= 'civicrm_action_schedule';
410 parent
::__construct();
414 * Returns localized title of this entity.
416 * @param bool $plural
417 * Whether to return the plural version of the title.
419 public static function getEntityTitle($plural = FALSE) {
420 return $plural ?
ts('Action Schedules') : ts('Action Schedule');
424 * Returns foreign keys and entity references.
427 * [CRM_Core_Reference_Interface]
429 public static function getReferenceColumns() {
430 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
431 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
432 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'group_id', 'civicrm_group', 'id');
433 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'msg_template_id', 'civicrm_msg_template', 'id');
434 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'sms_template_id', 'civicrm_msg_template', 'id');
435 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'sms_provider_id', 'civicrm_sms_provider', 'id');
436 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
438 return Civi
::$statics[__CLASS__
]['links'];
442 * Returns all the column names of this table
446 public static function &fields() {
447 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
448 Civi
::$statics[__CLASS__
]['fields'] = [
451 'type' => CRM_Utils_Type
::T_INT
,
452 'title' => ts('Action Schedule ID'),
454 'where' => 'civicrm_action_schedule.id',
455 'table_name' => 'civicrm_action_schedule',
456 'entity' => 'ActionSchedule',
457 'bao' => 'CRM_Core_BAO_ActionSchedule',
467 'type' => CRM_Utils_Type
::T_STRING
,
468 'title' => ts('Name'),
469 'description' => ts('Name of the action(reminder)'),
471 'size' => CRM_Utils_Type
::BIG
,
472 'where' => 'civicrm_action_schedule.name',
473 'table_name' => 'civicrm_action_schedule',
474 'entity' => 'ActionSchedule',
475 'bao' => 'CRM_Core_BAO_ActionSchedule',
481 'type' => CRM_Utils_Type
::T_STRING
,
482 'title' => ts('Title'),
483 'description' => ts('Title of the action(reminder)'),
485 'size' => CRM_Utils_Type
::BIG
,
486 'where' => 'civicrm_action_schedule.title',
487 'table_name' => 'civicrm_action_schedule',
488 'entity' => 'ActionSchedule',
489 'bao' => 'CRM_Core_BAO_ActionSchedule',
494 'name' => 'recipient',
495 'type' => CRM_Utils_Type
::T_STRING
,
496 'title' => ts('Recipient'),
497 'description' => ts('Recipient'),
499 'size' => CRM_Utils_Type
::BIG
,
500 'where' => 'civicrm_action_schedule.recipient',
501 'table_name' => 'civicrm_action_schedule',
502 'entity' => 'ActionSchedule',
503 'bao' => 'CRM_Core_BAO_ActionSchedule',
506 'label' => ts("Recipient"),
511 'name' => 'limit_to',
512 'type' => CRM_Utils_Type
::T_BOOLEAN
,
513 'title' => ts('Limit To'),
514 'description' => ts('Is this the recipient criteria limited to OR in addition to?'),
516 'where' => 'civicrm_action_schedule.limit_to',
518 'table_name' => 'civicrm_action_schedule',
519 'entity' => 'ActionSchedule',
520 'bao' => 'CRM_Core_BAO_ActionSchedule',
523 'label' => ts("Limit To"),
528 'name' => 'entity_value',
529 'type' => CRM_Utils_Type
::T_STRING
,
530 'title' => ts('Entity Value'),
531 'description' => ts('Entity value'),
533 'size' => CRM_Utils_Type
::HUGE
,
534 'where' => 'civicrm_action_schedule.entity_value',
535 'table_name' => 'civicrm_action_schedule',
536 'entity' => 'ActionSchedule',
537 'bao' => 'CRM_Core_BAO_ActionSchedule',
539 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
541 'label' => ts("Entity value"),
546 'name' => 'entity_status',
547 'type' => CRM_Utils_Type
::T_STRING
,
548 'title' => ts('Entity Status'),
549 'description' => ts('Entity status'),
551 'size' => CRM_Utils_Type
::BIG
,
552 'where' => 'civicrm_action_schedule.entity_status',
553 'table_name' => 'civicrm_action_schedule',
554 'entity' => 'ActionSchedule',
555 'bao' => 'CRM_Core_BAO_ActionSchedule',
557 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
559 'label' => ts("Entity Status"),
563 'start_action_offset' => [
564 'name' => 'start_action_offset',
565 'type' => CRM_Utils_Type
::T_INT
,
566 'title' => ts('Start Action Offset'),
567 'description' => ts('Reminder Interval.'),
568 'where' => 'civicrm_action_schedule.start_action_offset',
570 'table_name' => 'civicrm_action_schedule',
571 'entity' => 'ActionSchedule',
572 'bao' => 'CRM_Core_BAO_ActionSchedule',
575 'label' => ts("Start Action Offset"),
579 'start_action_unit' => [
580 'name' => 'start_action_unit',
581 'type' => CRM_Utils_Type
::T_STRING
,
582 'title' => ts('Start Action Unit'),
583 'description' => ts('Time units for reminder.'),
585 'size' => CRM_Utils_Type
::EIGHT
,
586 'where' => 'civicrm_action_schedule.start_action_unit',
587 'table_name' => 'civicrm_action_schedule',
588 'entity' => 'ActionSchedule',
589 'bao' => 'CRM_Core_BAO_ActionSchedule',
593 'label' => ts("Start Action Unit"),
595 'pseudoconstant' => [
596 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
600 'start_action_condition' => [
601 'name' => 'start_action_condition',
602 'type' => CRM_Utils_Type
::T_STRING
,
603 'title' => ts('Start Action Condition'),
604 'description' => ts('Reminder Action'),
606 'size' => CRM_Utils_Type
::BIG
,
607 'where' => 'civicrm_action_schedule.start_action_condition',
608 'table_name' => 'civicrm_action_schedule',
609 'entity' => 'ActionSchedule',
610 'bao' => 'CRM_Core_BAO_ActionSchedule',
613 'label' => ts("Start Action condition"),
617 'start_action_date' => [
618 'name' => 'start_action_date',
619 'type' => CRM_Utils_Type
::T_STRING
,
620 'title' => ts('Start Action Date'),
621 'description' => ts('Entity date'),
623 'size' => CRM_Utils_Type
::BIG
,
624 'where' => 'civicrm_action_schedule.start_action_date',
625 'table_name' => 'civicrm_action_schedule',
626 'entity' => 'ActionSchedule',
627 'bao' => 'CRM_Core_BAO_ActionSchedule',
630 'label' => ts("Start Action Date"),
635 'name' => 'is_repeat',
636 'type' => CRM_Utils_Type
::T_BOOLEAN
,
637 'title' => ts('Repeat?'),
639 'where' => 'civicrm_action_schedule.is_repeat',
641 'table_name' => 'civicrm_action_schedule',
642 'entity' => 'ActionSchedule',
643 'bao' => 'CRM_Core_BAO_ActionSchedule',
647 'repetition_frequency_unit' => [
648 'name' => 'repetition_frequency_unit',
649 'type' => CRM_Utils_Type
::T_STRING
,
650 'title' => ts('Repetition Frequency Unit'),
651 'description' => ts('Time units for repetition of reminder.'),
653 'size' => CRM_Utils_Type
::EIGHT
,
654 'where' => 'civicrm_action_schedule.repetition_frequency_unit',
655 'table_name' => 'civicrm_action_schedule',
656 'entity' => 'ActionSchedule',
657 'bao' => 'CRM_Core_BAO_ActionSchedule',
661 'label' => ts("Repetition Frequency Unit"),
663 'pseudoconstant' => [
664 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
668 'repetition_frequency_interval' => [
669 'name' => 'repetition_frequency_interval',
670 'type' => CRM_Utils_Type
::T_INT
,
671 'title' => ts('Repetition Frequency Interval'),
672 'description' => ts('Time interval for repeating the reminder.'),
673 'where' => 'civicrm_action_schedule.repetition_frequency_interval',
675 'table_name' => 'civicrm_action_schedule',
676 'entity' => 'ActionSchedule',
677 'bao' => 'CRM_Core_BAO_ActionSchedule',
680 'label' => ts("Repetition Frequency Interval"),
684 'end_frequency_unit' => [
685 'name' => 'end_frequency_unit',
686 'type' => CRM_Utils_Type
::T_STRING
,
687 'title' => ts('End Frequency Unit'),
688 'description' => ts('Time units till repetition of reminder.'),
690 'size' => CRM_Utils_Type
::EIGHT
,
691 'where' => 'civicrm_action_schedule.end_frequency_unit',
692 'table_name' => 'civicrm_action_schedule',
693 'entity' => 'ActionSchedule',
694 'bao' => 'CRM_Core_BAO_ActionSchedule',
698 'label' => ts("End Frequency Unit"),
700 'pseudoconstant' => [
701 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
705 'end_frequency_interval' => [
706 'name' => 'end_frequency_interval',
707 'type' => CRM_Utils_Type
::T_INT
,
708 'title' => ts('End Frequency Interval'),
709 'description' => ts('Time interval till repeating the reminder.'),
710 'where' => 'civicrm_action_schedule.end_frequency_interval',
712 'table_name' => 'civicrm_action_schedule',
713 'entity' => 'ActionSchedule',
714 'bao' => 'CRM_Core_BAO_ActionSchedule',
717 'label' => ts("End Frequency Interval"),
722 'name' => 'end_action',
723 'type' => CRM_Utils_Type
::T_STRING
,
724 'title' => ts('End Action'),
725 'description' => ts('Reminder Action till repeating the reminder.'),
727 'size' => CRM_Utils_Type
::MEDIUM
,
728 'where' => 'civicrm_action_schedule.end_action',
729 'table_name' => 'civicrm_action_schedule',
730 'entity' => 'ActionSchedule',
731 'bao' => 'CRM_Core_BAO_ActionSchedule',
734 'label' => ts("End Action"),
739 'name' => 'end_date',
740 'type' => CRM_Utils_Type
::T_STRING
,
741 'title' => ts('End Date'),
742 'description' => ts('Entity end date'),
744 'size' => CRM_Utils_Type
::BIG
,
745 'where' => 'civicrm_action_schedule.end_date',
746 'table_name' => 'civicrm_action_schedule',
747 'entity' => 'ActionSchedule',
748 'bao' => 'CRM_Core_BAO_ActionSchedule',
751 'label' => ts("End Date"),
756 'name' => 'is_active',
757 'type' => CRM_Utils_Type
::T_BOOLEAN
,
758 'title' => ts('Schedule is Active?'),
759 'description' => ts('Is this option active?'),
761 'where' => 'civicrm_action_schedule.is_active',
763 'table_name' => 'civicrm_action_schedule',
764 'entity' => 'ActionSchedule',
765 'bao' => 'CRM_Core_BAO_ActionSchedule',
769 'recipient_manual' => [
770 'name' => 'recipient_manual',
771 'type' => CRM_Utils_Type
::T_STRING
,
772 'title' => ts('Recipient Manual'),
773 'description' => ts('Contact IDs to which reminder should be sent.'),
775 'size' => CRM_Utils_Type
::HUGE
,
776 'where' => 'civicrm_action_schedule.recipient_manual',
777 'table_name' => 'civicrm_action_schedule',
778 'entity' => 'ActionSchedule',
779 'bao' => 'CRM_Core_BAO_ActionSchedule',
781 'serialize' => self
::SERIALIZE_COMMA
,
784 'recipient_listing' => [
785 'name' => 'recipient_listing',
786 'type' => CRM_Utils_Type
::T_STRING
,
787 'title' => ts('Recipient Listing'),
788 'description' => ts('listing based on recipient field.'),
790 'size' => CRM_Utils_Type
::HUGE
,
791 'where' => 'civicrm_action_schedule.recipient_listing',
792 'table_name' => 'civicrm_action_schedule',
793 'entity' => 'ActionSchedule',
794 'bao' => 'CRM_Core_BAO_ActionSchedule',
799 'name' => 'body_text',
800 'type' => CRM_Utils_Type
::T_LONGTEXT
,
801 'title' => ts('Reminder Text'),
802 'description' => ts('Body of the mailing in text format.'),
803 'where' => 'civicrm_action_schedule.body_text',
804 'table_name' => 'civicrm_action_schedule',
805 'entity' => 'ActionSchedule',
806 'bao' => 'CRM_Core_BAO_ActionSchedule',
811 'name' => 'body_html',
812 'type' => CRM_Utils_Type
::T_LONGTEXT
,
813 'title' => ts('Reminder HTML'),
814 'description' => ts('Body of the mailing in html format.'),
815 'where' => 'civicrm_action_schedule.body_html',
816 'table_name' => 'civicrm_action_schedule',
817 'entity' => 'ActionSchedule',
818 'bao' => 'CRM_Core_BAO_ActionSchedule',
823 'name' => 'sms_body_text',
824 'type' => CRM_Utils_Type
::T_LONGTEXT
,
825 'title' => ts('SMS Reminder Text'),
826 'description' => ts('Content of the SMS text.'),
827 'where' => 'civicrm_action_schedule.sms_body_text',
828 'table_name' => 'civicrm_action_schedule',
829 'entity' => 'ActionSchedule',
830 'bao' => 'CRM_Core_BAO_ActionSchedule',
836 'type' => CRM_Utils_Type
::T_STRING
,
837 'title' => ts('Reminder Subject'),
838 'description' => ts('Subject of mailing'),
840 'size' => CRM_Utils_Type
::HUGE
,
841 'where' => 'civicrm_action_schedule.subject',
842 'table_name' => 'civicrm_action_schedule',
843 'entity' => 'ActionSchedule',
844 'bao' => 'CRM_Core_BAO_ActionSchedule',
848 'record_activity' => [
849 'name' => 'record_activity',
850 'type' => CRM_Utils_Type
::T_BOOLEAN
,
851 'title' => ts('Record Activity for Reminder?'),
852 'description' => ts('Record Activity for this reminder?'),
854 'where' => 'civicrm_action_schedule.record_activity',
856 'table_name' => 'civicrm_action_schedule',
857 'entity' => 'ActionSchedule',
858 'bao' => 'CRM_Core_BAO_ActionSchedule',
863 'name' => 'mapping_id',
864 'type' => CRM_Utils_Type
::T_STRING
,
865 'title' => ts('Reminder Mapping'),
866 'description' => ts('Name/ID of the mapping to use on this table'),
868 'size' => CRM_Utils_Type
::BIG
,
869 'where' => 'civicrm_action_schedule.mapping_id',
870 'table_name' => 'civicrm_action_schedule',
871 'entity' => 'ActionSchedule',
872 'bao' => 'CRM_Core_BAO_ActionSchedule',
877 'name' => 'group_id',
878 'type' => CRM_Utils_Type
::T_INT
,
879 'title' => ts('Group ID'),
880 'description' => ts('FK to Group'),
881 'where' => 'civicrm_action_schedule.group_id',
882 'table_name' => 'civicrm_action_schedule',
883 'entity' => 'ActionSchedule',
884 'bao' => 'CRM_Core_BAO_ActionSchedule',
886 'FKClassName' => 'CRM_Contact_DAO_Group',
889 'label' => ts("Group"),
891 'pseudoconstant' => [
892 'table' => 'civicrm_group',
894 'labelColumn' => 'title',
898 'msg_template_id' => [
899 'name' => 'msg_template_id',
900 'type' => CRM_Utils_Type
::T_INT
,
901 'title' => ts('Message Template ID'),
902 'description' => ts('FK to the message template.'),
903 'where' => 'civicrm_action_schedule.msg_template_id',
904 'table_name' => 'civicrm_action_schedule',
905 'entity' => 'ActionSchedule',
906 'bao' => 'CRM_Core_BAO_ActionSchedule',
908 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
910 'label' => ts("Message Template"),
914 'sms_template_id' => [
915 'name' => 'sms_template_id',
916 'type' => CRM_Utils_Type
::T_INT
,
917 'title' => ts('SMS Template ID'),
918 'description' => ts('FK to the message template.'),
919 'where' => 'civicrm_action_schedule.sms_template_id',
920 'table_name' => 'civicrm_action_schedule',
921 'entity' => 'ActionSchedule',
922 'bao' => 'CRM_Core_BAO_ActionSchedule',
924 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
926 'label' => ts("SMS Template"),
931 'name' => 'absolute_date',
932 'type' => CRM_Utils_Type
::T_DATE
,
933 'title' => ts('Fixed Date for Reminder'),
934 'description' => ts('Date on which the reminder be sent.'),
935 'where' => 'civicrm_action_schedule.absolute_date',
936 'table_name' => 'civicrm_action_schedule',
937 'entity' => 'ActionSchedule',
938 'bao' => 'CRM_Core_BAO_ActionSchedule',
943 'name' => 'from_name',
944 'type' => CRM_Utils_Type
::T_STRING
,
945 'title' => ts('Reminder from Name'),
946 'description' => ts('Name in "from" field'),
948 'size' => CRM_Utils_Type
::HUGE
,
949 'where' => 'civicrm_action_schedule.from_name',
950 'table_name' => 'civicrm_action_schedule',
951 'entity' => 'ActionSchedule',
952 'bao' => 'CRM_Core_BAO_ActionSchedule',
957 'name' => 'from_email',
958 'type' => CRM_Utils_Type
::T_STRING
,
959 'title' => ts('Reminder From Email'),
960 'description' => ts('Email address in "from" field'),
962 'size' => CRM_Utils_Type
::HUGE
,
963 'where' => 'civicrm_action_schedule.from_email',
964 'table_name' => 'civicrm_action_schedule',
965 'entity' => 'ActionSchedule',
966 'bao' => 'CRM_Core_BAO_ActionSchedule',
972 'type' => CRM_Utils_Type
::T_STRING
,
973 'title' => ts('Message Mode'),
974 'description' => ts('Send the message as email or sms or both.'),
976 'size' => CRM_Utils_Type
::HUGE
,
977 'where' => 'civicrm_action_schedule.mode',
978 'default' => 'Email',
979 'table_name' => 'civicrm_action_schedule',
980 'entity' => 'ActionSchedule',
981 'bao' => 'CRM_Core_BAO_ActionSchedule',
986 'pseudoconstant' => [
987 'optionGroupName' => 'msg_mode',
988 'optionEditPath' => 'civicrm/admin/options/msg_mode',
992 'sms_provider_id' => [
993 'name' => 'sms_provider_id',
994 'type' => CRM_Utils_Type
::T_INT
,
995 'title' => ts('SMS Provider ID'),
996 'where' => 'civicrm_action_schedule.sms_provider_id',
997 'table_name' => 'civicrm_action_schedule',
998 'entity' => 'ActionSchedule',
999 'bao' => 'CRM_Core_BAO_ActionSchedule',
1001 'FKClassName' => 'CRM_SMS_DAO_Provider',
1004 'label' => ts("SMS Provider"),
1009 'name' => 'used_for',
1010 'type' => CRM_Utils_Type
::T_STRING
,
1011 'title' => ts('Used For'),
1012 'description' => ts('Used for repeating entity'),
1014 'size' => CRM_Utils_Type
::BIG
,
1015 'where' => 'civicrm_action_schedule.used_for',
1016 'table_name' => 'civicrm_action_schedule',
1017 'entity' => 'ActionSchedule',
1018 'bao' => 'CRM_Core_BAO_ActionSchedule',
1021 'label' => ts("Used For"),
1025 'filter_contact_language' => [
1026 'name' => 'filter_contact_language',
1027 'type' => CRM_Utils_Type
::T_STRING
,
1028 'title' => ts('Filter Contact Language'),
1029 'description' => ts('Used for multilingual installation'),
1031 'size' => CRM_Utils_Type
::HUGE
,
1032 'where' => 'civicrm_action_schedule.filter_contact_language',
1033 'table_name' => 'civicrm_action_schedule',
1034 'entity' => 'ActionSchedule',
1035 'bao' => 'CRM_Core_BAO_ActionSchedule',
1038 'label' => ts("Filter Contact Language"),
1042 'communication_language' => [
1043 'name' => 'communication_language',
1044 'type' => CRM_Utils_Type
::T_STRING
,
1045 'title' => ts('Communication Language'),
1046 'description' => ts('Used for multilingual installation'),
1048 'size' => CRM_Utils_Type
::EIGHT
,
1049 'where' => 'civicrm_action_schedule.communication_language',
1050 'table_name' => 'civicrm_action_schedule',
1051 'entity' => 'ActionSchedule',
1052 'bao' => 'CRM_Core_BAO_ActionSchedule',
1055 'label' => ts("Communication Language"),
1059 'action_schedule_created_date' => [
1060 'name' => 'created_date',
1061 'type' => CRM_Utils_Type
::T_TIMESTAMP
,
1062 'title' => ts('Created Date'),
1063 'description' => ts('When was the scheduled reminder created.'),
1064 'required' => FALSE,
1065 'where' => 'civicrm_action_schedule.created_date',
1067 'default' => 'CURRENT_TIMESTAMP',
1068 'table_name' => 'civicrm_action_schedule',
1069 'entity' => 'ActionSchedule',
1070 'bao' => 'CRM_Core_BAO_ActionSchedule',
1074 'modified_date' => [
1075 'name' => 'modified_date',
1076 'type' => CRM_Utils_Type
::T_TIMESTAMP
,
1077 'title' => ts('Modified Date'),
1078 'description' => ts('When the reminder was created or modified.'),
1079 'required' => FALSE,
1080 'where' => 'civicrm_action_schedule.modified_date',
1081 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
1082 'table_name' => 'civicrm_action_schedule',
1083 'entity' => 'ActionSchedule',
1084 'bao' => 'CRM_Core_BAO_ActionSchedule',
1087 'label' => ts("Modified Date"),
1092 'action_schedule_effective_start_date' => [
1093 'name' => 'effective_start_date',
1094 'type' => CRM_Utils_Type
::T_TIMESTAMP
,
1095 'title' => ts('Effective start date'),
1096 'description' => ts('Earliest date to consider start events from.'),
1097 'required' => FALSE,
1098 'where' => 'civicrm_action_schedule.effective_start_date',
1100 'table_name' => 'civicrm_action_schedule',
1101 'entity' => 'ActionSchedule',
1102 'bao' => 'CRM_Core_BAO_ActionSchedule',
1106 'action_schedule_effective_end_date' => [
1107 'name' => 'effective_end_date',
1108 'type' => CRM_Utils_Type
::T_TIMESTAMP
,
1109 'title' => ts('Effective end date'),
1110 'description' => ts('Latest date to consider end events from.'),
1111 'required' => FALSE,
1112 'where' => 'civicrm_action_schedule.effective_end_date',
1114 'table_name' => 'civicrm_action_schedule',
1115 'entity' => 'ActionSchedule',
1116 'bao' => 'CRM_Core_BAO_ActionSchedule',
1121 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1123 return Civi
::$statics[__CLASS__
]['fields'];
1127 * Return a mapping from field-name to the corresponding key (as used in fields()).
1130 * Array(string $name => string $uniqueName).
1132 public static function &fieldKeys() {
1133 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1134 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1136 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1140 * Returns the names of this table
1144 public static function getTableName() {
1145 return self
::$_tableName;
1149 * Returns if this table needs to be logged
1153 public function getLog() {
1158 * Returns the list of fields that can be imported
1160 * @param bool $prefix
1164 public static function &import($prefix = FALSE) {
1165 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'action_schedule', $prefix, []);
1170 * Returns the list of fields that can be exported
1172 * @param bool $prefix
1176 public static function &export($prefix = FALSE) {
1177 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'action_schedule', $prefix, []);
1182 * Returns the list of indices
1184 * @param bool $localize
1188 public static function indices($localize = TRUE) {
1190 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;