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:ea596948c02894437bcc1a3f5b5c4f9d)
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?
70 * @var bool|string|null
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;
131 * @var bool|string|null
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?
194 * @var bool|string|null
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?
257 * @var bool|string|null
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?'),
515 'where' => 'civicrm_action_schedule.limit_to',
516 'table_name' => 'civicrm_action_schedule',
517 'entity' => 'ActionSchedule',
518 'bao' => 'CRM_Core_BAO_ActionSchedule',
521 'label' => ts("Limit To"),
526 'name' => 'entity_value',
527 'type' => CRM_Utils_Type
::T_STRING
,
528 'title' => ts('Entity Value'),
529 'description' => ts('Entity value'),
531 'size' => CRM_Utils_Type
::HUGE
,
532 'where' => 'civicrm_action_schedule.entity_value',
533 'table_name' => 'civicrm_action_schedule',
534 'entity' => 'ActionSchedule',
535 'bao' => 'CRM_Core_BAO_ActionSchedule',
537 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
539 'label' => ts("Entity value"),
544 'name' => 'entity_status',
545 'type' => CRM_Utils_Type
::T_STRING
,
546 'title' => ts('Entity Status'),
547 'description' => ts('Entity status'),
549 'size' => CRM_Utils_Type
::BIG
,
550 'where' => 'civicrm_action_schedule.entity_status',
551 'table_name' => 'civicrm_action_schedule',
552 'entity' => 'ActionSchedule',
553 'bao' => 'CRM_Core_BAO_ActionSchedule',
555 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
557 'label' => ts("Entity Status"),
561 'start_action_offset' => [
562 'name' => 'start_action_offset',
563 'type' => CRM_Utils_Type
::T_INT
,
564 'title' => ts('Start Action Offset'),
565 'description' => ts('Reminder Interval.'),
566 'where' => 'civicrm_action_schedule.start_action_offset',
568 'table_name' => 'civicrm_action_schedule',
569 'entity' => 'ActionSchedule',
570 'bao' => 'CRM_Core_BAO_ActionSchedule',
573 'label' => ts("Start Action Offset"),
577 'start_action_unit' => [
578 'name' => 'start_action_unit',
579 'type' => CRM_Utils_Type
::T_STRING
,
580 'title' => ts('Start Action Unit'),
581 'description' => ts('Time units for reminder.'),
583 'size' => CRM_Utils_Type
::EIGHT
,
584 'where' => 'civicrm_action_schedule.start_action_unit',
585 'table_name' => 'civicrm_action_schedule',
586 'entity' => 'ActionSchedule',
587 'bao' => 'CRM_Core_BAO_ActionSchedule',
591 'label' => ts("Start Action Unit"),
593 'pseudoconstant' => [
594 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
598 'start_action_condition' => [
599 'name' => 'start_action_condition',
600 'type' => CRM_Utils_Type
::T_STRING
,
601 'title' => ts('Start Action Condition'),
602 'description' => ts('Reminder Action'),
604 'size' => CRM_Utils_Type
::BIG
,
605 'where' => 'civicrm_action_schedule.start_action_condition',
606 'table_name' => 'civicrm_action_schedule',
607 'entity' => 'ActionSchedule',
608 'bao' => 'CRM_Core_BAO_ActionSchedule',
611 'label' => ts("Start Action condition"),
615 'start_action_date' => [
616 'name' => 'start_action_date',
617 'type' => CRM_Utils_Type
::T_STRING
,
618 'title' => ts('Start Action Date'),
619 'description' => ts('Entity date'),
621 'size' => CRM_Utils_Type
::BIG
,
622 'where' => 'civicrm_action_schedule.start_action_date',
623 'table_name' => 'civicrm_action_schedule',
624 'entity' => 'ActionSchedule',
625 'bao' => 'CRM_Core_BAO_ActionSchedule',
628 'label' => ts("Start Action Date"),
633 'name' => 'is_repeat',
634 'type' => CRM_Utils_Type
::T_BOOLEAN
,
635 'title' => ts('Repeat?'),
636 'where' => 'civicrm_action_schedule.is_repeat',
638 'table_name' => 'civicrm_action_schedule',
639 'entity' => 'ActionSchedule',
640 'bao' => 'CRM_Core_BAO_ActionSchedule',
644 'repetition_frequency_unit' => [
645 'name' => 'repetition_frequency_unit',
646 'type' => CRM_Utils_Type
::T_STRING
,
647 'title' => ts('Repetition Frequency Unit'),
648 'description' => ts('Time units for repetition of reminder.'),
650 'size' => CRM_Utils_Type
::EIGHT
,
651 'where' => 'civicrm_action_schedule.repetition_frequency_unit',
652 'table_name' => 'civicrm_action_schedule',
653 'entity' => 'ActionSchedule',
654 'bao' => 'CRM_Core_BAO_ActionSchedule',
658 'label' => ts("Repetition Frequency Unit"),
660 'pseudoconstant' => [
661 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
665 'repetition_frequency_interval' => [
666 'name' => 'repetition_frequency_interval',
667 'type' => CRM_Utils_Type
::T_INT
,
668 'title' => ts('Repetition Frequency Interval'),
669 'description' => ts('Time interval for repeating the reminder.'),
670 'where' => 'civicrm_action_schedule.repetition_frequency_interval',
672 'table_name' => 'civicrm_action_schedule',
673 'entity' => 'ActionSchedule',
674 'bao' => 'CRM_Core_BAO_ActionSchedule',
677 'label' => ts("Repetition Frequency Interval"),
681 'end_frequency_unit' => [
682 'name' => 'end_frequency_unit',
683 'type' => CRM_Utils_Type
::T_STRING
,
684 'title' => ts('End Frequency Unit'),
685 'description' => ts('Time units till repetition of reminder.'),
687 'size' => CRM_Utils_Type
::EIGHT
,
688 'where' => 'civicrm_action_schedule.end_frequency_unit',
689 'table_name' => 'civicrm_action_schedule',
690 'entity' => 'ActionSchedule',
691 'bao' => 'CRM_Core_BAO_ActionSchedule',
695 'label' => ts("End Frequency Unit"),
697 'pseudoconstant' => [
698 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
702 'end_frequency_interval' => [
703 'name' => 'end_frequency_interval',
704 'type' => CRM_Utils_Type
::T_INT
,
705 'title' => ts('End Frequency Interval'),
706 'description' => ts('Time interval till repeating the reminder.'),
707 'where' => 'civicrm_action_schedule.end_frequency_interval',
709 'table_name' => 'civicrm_action_schedule',
710 'entity' => 'ActionSchedule',
711 'bao' => 'CRM_Core_BAO_ActionSchedule',
714 'label' => ts("End Frequency Interval"),
719 'name' => 'end_action',
720 'type' => CRM_Utils_Type
::T_STRING
,
721 'title' => ts('End Action'),
722 'description' => ts('Reminder Action till repeating the reminder.'),
724 'size' => CRM_Utils_Type
::MEDIUM
,
725 'where' => 'civicrm_action_schedule.end_action',
726 'table_name' => 'civicrm_action_schedule',
727 'entity' => 'ActionSchedule',
728 'bao' => 'CRM_Core_BAO_ActionSchedule',
731 'label' => ts("End Action"),
736 'name' => 'end_date',
737 'type' => CRM_Utils_Type
::T_STRING
,
738 'title' => ts('End Date'),
739 'description' => ts('Entity end date'),
741 'size' => CRM_Utils_Type
::BIG
,
742 'where' => 'civicrm_action_schedule.end_date',
743 'table_name' => 'civicrm_action_schedule',
744 'entity' => 'ActionSchedule',
745 'bao' => 'CRM_Core_BAO_ActionSchedule',
748 'label' => ts("End Date"),
753 'name' => 'is_active',
754 'type' => CRM_Utils_Type
::T_BOOLEAN
,
755 'title' => ts('Schedule is Active?'),
756 'description' => ts('Is this option active?'),
757 'where' => 'civicrm_action_schedule.is_active',
759 'table_name' => 'civicrm_action_schedule',
760 'entity' => 'ActionSchedule',
761 'bao' => 'CRM_Core_BAO_ActionSchedule',
765 'recipient_manual' => [
766 'name' => 'recipient_manual',
767 'type' => CRM_Utils_Type
::T_STRING
,
768 'title' => ts('Recipient Manual'),
769 'description' => ts('Contact IDs to which reminder should be sent.'),
771 'size' => CRM_Utils_Type
::HUGE
,
772 'where' => 'civicrm_action_schedule.recipient_manual',
773 'table_name' => 'civicrm_action_schedule',
774 'entity' => 'ActionSchedule',
775 'bao' => 'CRM_Core_BAO_ActionSchedule',
777 'serialize' => self
::SERIALIZE_COMMA
,
780 'recipient_listing' => [
781 'name' => 'recipient_listing',
782 'type' => CRM_Utils_Type
::T_STRING
,
783 'title' => ts('Recipient Listing'),
784 'description' => ts('listing based on recipient field.'),
786 'size' => CRM_Utils_Type
::HUGE
,
787 'where' => 'civicrm_action_schedule.recipient_listing',
788 'table_name' => 'civicrm_action_schedule',
789 'entity' => 'ActionSchedule',
790 'bao' => 'CRM_Core_BAO_ActionSchedule',
795 'name' => 'body_text',
796 'type' => CRM_Utils_Type
::T_LONGTEXT
,
797 'title' => ts('Reminder Text'),
798 'description' => ts('Body of the mailing in text format.'),
799 'where' => 'civicrm_action_schedule.body_text',
800 'table_name' => 'civicrm_action_schedule',
801 'entity' => 'ActionSchedule',
802 'bao' => 'CRM_Core_BAO_ActionSchedule',
807 'name' => 'body_html',
808 'type' => CRM_Utils_Type
::T_LONGTEXT
,
809 'title' => ts('Reminder HTML'),
810 'description' => ts('Body of the mailing in html format.'),
811 'where' => 'civicrm_action_schedule.body_html',
812 'table_name' => 'civicrm_action_schedule',
813 'entity' => 'ActionSchedule',
814 'bao' => 'CRM_Core_BAO_ActionSchedule',
819 'name' => 'sms_body_text',
820 'type' => CRM_Utils_Type
::T_LONGTEXT
,
821 'title' => ts('SMS Reminder Text'),
822 'description' => ts('Content of the SMS text.'),
823 'where' => 'civicrm_action_schedule.sms_body_text',
824 'table_name' => 'civicrm_action_schedule',
825 'entity' => 'ActionSchedule',
826 'bao' => 'CRM_Core_BAO_ActionSchedule',
832 'type' => CRM_Utils_Type
::T_STRING
,
833 'title' => ts('Reminder Subject'),
834 'description' => ts('Subject of mailing'),
836 'size' => CRM_Utils_Type
::HUGE
,
837 'where' => 'civicrm_action_schedule.subject',
838 'table_name' => 'civicrm_action_schedule',
839 'entity' => 'ActionSchedule',
840 'bao' => 'CRM_Core_BAO_ActionSchedule',
844 'record_activity' => [
845 'name' => 'record_activity',
846 'type' => CRM_Utils_Type
::T_BOOLEAN
,
847 'title' => ts('Record Activity for Reminder?'),
848 'description' => ts('Record Activity for this reminder?'),
849 'where' => 'civicrm_action_schedule.record_activity',
851 'table_name' => 'civicrm_action_schedule',
852 'entity' => 'ActionSchedule',
853 'bao' => 'CRM_Core_BAO_ActionSchedule',
858 'name' => 'mapping_id',
859 'type' => CRM_Utils_Type
::T_STRING
,
860 'title' => ts('Reminder Mapping'),
861 'description' => ts('Name/ID of the mapping to use on this table'),
863 'size' => CRM_Utils_Type
::BIG
,
864 'where' => 'civicrm_action_schedule.mapping_id',
865 'table_name' => 'civicrm_action_schedule',
866 'entity' => 'ActionSchedule',
867 'bao' => 'CRM_Core_BAO_ActionSchedule',
872 'name' => 'group_id',
873 'type' => CRM_Utils_Type
::T_INT
,
874 'title' => ts('Group ID'),
875 'description' => ts('FK to Group'),
876 'where' => 'civicrm_action_schedule.group_id',
877 'table_name' => 'civicrm_action_schedule',
878 'entity' => 'ActionSchedule',
879 'bao' => 'CRM_Core_BAO_ActionSchedule',
881 'FKClassName' => 'CRM_Contact_DAO_Group',
884 'label' => ts("Group"),
886 'pseudoconstant' => [
887 'table' => 'civicrm_group',
889 'labelColumn' => 'title',
893 'msg_template_id' => [
894 'name' => 'msg_template_id',
895 'type' => CRM_Utils_Type
::T_INT
,
896 'title' => ts('Message Template ID'),
897 'description' => ts('FK to the message template.'),
898 'where' => 'civicrm_action_schedule.msg_template_id',
899 'table_name' => 'civicrm_action_schedule',
900 'entity' => 'ActionSchedule',
901 'bao' => 'CRM_Core_BAO_ActionSchedule',
903 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
905 'label' => ts("Message Template"),
909 'sms_template_id' => [
910 'name' => 'sms_template_id',
911 'type' => CRM_Utils_Type
::T_INT
,
912 'title' => ts('SMS Template ID'),
913 'description' => ts('FK to the message template.'),
914 'where' => 'civicrm_action_schedule.sms_template_id',
915 'table_name' => 'civicrm_action_schedule',
916 'entity' => 'ActionSchedule',
917 'bao' => 'CRM_Core_BAO_ActionSchedule',
919 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
921 'label' => ts("SMS Template"),
926 'name' => 'absolute_date',
927 'type' => CRM_Utils_Type
::T_DATE
,
928 'title' => ts('Fixed Date for Reminder'),
929 'description' => ts('Date on which the reminder be sent.'),
930 'where' => 'civicrm_action_schedule.absolute_date',
931 'table_name' => 'civicrm_action_schedule',
932 'entity' => 'ActionSchedule',
933 'bao' => 'CRM_Core_BAO_ActionSchedule',
938 'name' => 'from_name',
939 'type' => CRM_Utils_Type
::T_STRING
,
940 'title' => ts('Reminder from Name'),
941 'description' => ts('Name in "from" field'),
943 'size' => CRM_Utils_Type
::HUGE
,
944 'where' => 'civicrm_action_schedule.from_name',
945 'table_name' => 'civicrm_action_schedule',
946 'entity' => 'ActionSchedule',
947 'bao' => 'CRM_Core_BAO_ActionSchedule',
952 'name' => 'from_email',
953 'type' => CRM_Utils_Type
::T_STRING
,
954 'title' => ts('Reminder From Email'),
955 'description' => ts('Email address in "from" field'),
957 'size' => CRM_Utils_Type
::HUGE
,
958 'where' => 'civicrm_action_schedule.from_email',
959 'table_name' => 'civicrm_action_schedule',
960 'entity' => 'ActionSchedule',
961 'bao' => 'CRM_Core_BAO_ActionSchedule',
967 'type' => CRM_Utils_Type
::T_STRING
,
968 'title' => ts('Message Mode'),
969 'description' => ts('Send the message as email or sms or both.'),
971 'size' => CRM_Utils_Type
::HUGE
,
972 'where' => 'civicrm_action_schedule.mode',
973 'default' => 'Email',
974 'table_name' => 'civicrm_action_schedule',
975 'entity' => 'ActionSchedule',
976 'bao' => 'CRM_Core_BAO_ActionSchedule',
981 'pseudoconstant' => [
982 'optionGroupName' => 'msg_mode',
983 'optionEditPath' => 'civicrm/admin/options/msg_mode',
987 'sms_provider_id' => [
988 'name' => 'sms_provider_id',
989 'type' => CRM_Utils_Type
::T_INT
,
990 'title' => ts('SMS Provider ID'),
991 'where' => 'civicrm_action_schedule.sms_provider_id',
992 'table_name' => 'civicrm_action_schedule',
993 'entity' => 'ActionSchedule',
994 'bao' => 'CRM_Core_BAO_ActionSchedule',
996 'FKClassName' => 'CRM_SMS_DAO_Provider',
999 'label' => ts("SMS Provider"),
1004 'name' => 'used_for',
1005 'type' => CRM_Utils_Type
::T_STRING
,
1006 'title' => ts('Used For'),
1007 'description' => ts('Used for repeating entity'),
1009 'size' => CRM_Utils_Type
::BIG
,
1010 'where' => 'civicrm_action_schedule.used_for',
1011 'table_name' => 'civicrm_action_schedule',
1012 'entity' => 'ActionSchedule',
1013 'bao' => 'CRM_Core_BAO_ActionSchedule',
1016 'label' => ts("Used For"),
1020 'filter_contact_language' => [
1021 'name' => 'filter_contact_language',
1022 'type' => CRM_Utils_Type
::T_STRING
,
1023 'title' => ts('Filter Contact Language'),
1024 'description' => ts('Used for multilingual installation'),
1026 'size' => CRM_Utils_Type
::HUGE
,
1027 'where' => 'civicrm_action_schedule.filter_contact_language',
1028 'table_name' => 'civicrm_action_schedule',
1029 'entity' => 'ActionSchedule',
1030 'bao' => 'CRM_Core_BAO_ActionSchedule',
1033 'label' => ts("Filter Contact Language"),
1037 'communication_language' => [
1038 'name' => 'communication_language',
1039 'type' => CRM_Utils_Type
::T_STRING
,
1040 'title' => ts('Communication Language'),
1041 'description' => ts('Used for multilingual installation'),
1043 'size' => CRM_Utils_Type
::EIGHT
,
1044 'where' => 'civicrm_action_schedule.communication_language',
1045 'table_name' => 'civicrm_action_schedule',
1046 'entity' => 'ActionSchedule',
1047 'bao' => 'CRM_Core_BAO_ActionSchedule',
1050 'label' => ts("Communication Language"),
1054 'action_schedule_created_date' => [
1055 'name' => 'created_date',
1056 'type' => CRM_Utils_Type
::T_TIMESTAMP
,
1057 'title' => ts('Created Date'),
1058 'description' => ts('When was the scheduled reminder created.'),
1059 'required' => FALSE,
1060 'where' => 'civicrm_action_schedule.created_date',
1062 'default' => 'CURRENT_TIMESTAMP',
1063 'table_name' => 'civicrm_action_schedule',
1064 'entity' => 'ActionSchedule',
1065 'bao' => 'CRM_Core_BAO_ActionSchedule',
1069 'modified_date' => [
1070 'name' => 'modified_date',
1071 'type' => CRM_Utils_Type
::T_TIMESTAMP
,
1072 'title' => ts('Modified Date'),
1073 'description' => ts('When the reminder was created or modified.'),
1074 'required' => FALSE,
1075 'where' => 'civicrm_action_schedule.modified_date',
1076 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
1077 'table_name' => 'civicrm_action_schedule',
1078 'entity' => 'ActionSchedule',
1079 'bao' => 'CRM_Core_BAO_ActionSchedule',
1082 'label' => ts("Modified Date"),
1087 'action_schedule_effective_start_date' => [
1088 'name' => 'effective_start_date',
1089 'type' => CRM_Utils_Type
::T_TIMESTAMP
,
1090 'title' => ts('Effective start date'),
1091 'description' => ts('Earliest date to consider start events from.'),
1092 'required' => FALSE,
1093 'where' => 'civicrm_action_schedule.effective_start_date',
1095 'table_name' => 'civicrm_action_schedule',
1096 'entity' => 'ActionSchedule',
1097 'bao' => 'CRM_Core_BAO_ActionSchedule',
1101 'action_schedule_effective_end_date' => [
1102 'name' => 'effective_end_date',
1103 'type' => CRM_Utils_Type
::T_TIMESTAMP
,
1104 'title' => ts('Effective end date'),
1105 'description' => ts('Latest date to consider end events from.'),
1106 'required' => FALSE,
1107 'where' => 'civicrm_action_schedule.effective_end_date',
1109 'table_name' => 'civicrm_action_schedule',
1110 'entity' => 'ActionSchedule',
1111 'bao' => 'CRM_Core_BAO_ActionSchedule',
1116 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1118 return Civi
::$statics[__CLASS__
]['fields'];
1122 * Return a mapping from field-name to the corresponding key (as used in fields()).
1125 * Array(string $name => string $uniqueName).
1127 public static function &fieldKeys() {
1128 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1129 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1131 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1135 * Returns the names of this table
1139 public static function getTableName() {
1140 return self
::$_tableName;
1144 * Returns if this table needs to be logged
1148 public function getLog() {
1153 * Returns the list of fields that can be imported
1155 * @param bool $prefix
1159 public static function &import($prefix = FALSE) {
1160 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'action_schedule', $prefix, []);
1165 * Returns the list of fields that can be exported
1167 * @param bool $prefix
1171 public static function &export($prefix = FALSE) {
1172 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'action_schedule', $prefix, []);
1177 * Returns the list of indices
1179 * @param bool $localize
1183 public static function indices($localize = TRUE) {
1185 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;