3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2017
31 * Generated from xml/schema/CRM/Core/ActionSchedule.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:d158b2da297ca83e4210a3fa0da8d5eb)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Core_DAO_ActionSchedule constructor.
40 class CRM_Core_DAO_ActionSchedule
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_action_schedule';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
59 * Name of the action(reminder)
65 * Title of the action(reminder)
77 * Is this the recipient criteria limited to OR in addition to?
93 public $entity_status;
99 public $start_action_offset;
101 * Time units for reminder.
105 public $start_action_unit;
111 public $start_action_condition;
117 public $start_action_date;
124 * Time units for repetition of reminder.
128 public $repetition_frequency_unit;
130 * Time interval for repeating the reminder.
134 public $repetition_frequency_interval;
136 * Time units till repetition of reminder.
140 public $end_frequency_unit;
142 * Time interval till repeating the reminder.
146 public $end_frequency_interval;
148 * Reminder Action till repeating the reminder.
160 * Is this option active?
166 * Contact IDs to which reminder should be sent.
170 public $recipient_manual;
172 * listing based on recipient field.
176 public $recipient_listing;
178 * Body of the mailing in text format.
184 * Body of the mailing in html format.
190 * Content of the SMS text.
194 public $sms_body_text;
202 * Record Activity for this reminder?
206 public $record_activity;
208 * Name/ID of the mapping to use on this table
220 * FK to the message template.
224 public $msg_template_id;
226 * FK to the message template.
230 public $sms_template_id;
232 * Date on which the reminder be sent.
236 public $absolute_date;
238 * Name in "from" field
244 * Email address in "from" field
250 * Send the message as email or sms or both.
259 public $sms_provider_id;
261 * Used for repeating entity
267 * Used for multilingual installation
271 public $filter_contact_language;
273 * Used for multilingual installation
277 public $communication_language;
281 function __construct() {
282 $this->__table
= 'civicrm_action_schedule';
283 parent
::__construct();
286 * Returns foreign keys and entity references.
289 * [CRM_Core_Reference_Interface]
291 static function getReferenceColumns() {
292 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
293 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
294 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'group_id', 'civicrm_group', 'id');
295 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'msg_template_id', 'civicrm_msg_template', 'id');
296 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'sms_template_id', 'civicrm_msg_template', 'id');
297 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'sms_provider_id', 'civicrm_sms_provider', 'id');
298 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
300 return Civi
::$statics[__CLASS__
]['links'];
303 * Returns all the column names of this table
307 static function &fields() {
308 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
309 Civi
::$statics[__CLASS__
]['fields'] = array(
312 'type' => CRM_Utils_Type
::T_INT
,
313 'title' => ts('Action Schedule ID') ,
315 'table_name' => 'civicrm_action_schedule',
316 'entity' => 'ActionSchedule',
317 'bao' => 'CRM_Core_BAO_ActionSchedule',
322 'type' => CRM_Utils_Type
::T_STRING
,
323 'title' => ts('Name') ,
324 'description' => 'Name of the action(reminder)',
326 'size' => CRM_Utils_Type
::BIG
,
327 'table_name' => 'civicrm_action_schedule',
328 'entity' => 'ActionSchedule',
329 'bao' => 'CRM_Core_BAO_ActionSchedule',
334 'type' => CRM_Utils_Type
::T_STRING
,
335 'title' => ts('Title') ,
336 'description' => 'Title of the action(reminder)',
338 'size' => CRM_Utils_Type
::BIG
,
339 'table_name' => 'civicrm_action_schedule',
340 'entity' => 'ActionSchedule',
341 'bao' => 'CRM_Core_BAO_ActionSchedule',
344 'recipient' => array(
345 'name' => 'recipient',
346 'type' => CRM_Utils_Type
::T_STRING
,
347 'title' => ts('Recipient') ,
348 'description' => 'Recipient',
350 'size' => CRM_Utils_Type
::BIG
,
351 'table_name' => 'civicrm_action_schedule',
352 'entity' => 'ActionSchedule',
353 'bao' => 'CRM_Core_BAO_ActionSchedule',
357 'name' => 'limit_to',
358 'type' => CRM_Utils_Type
::T_BOOLEAN
,
359 'title' => ts('Limit To') ,
360 'description' => 'Is this the recipient criteria limited to OR in addition to?',
361 'table_name' => 'civicrm_action_schedule',
362 'entity' => 'ActionSchedule',
363 'bao' => 'CRM_Core_BAO_ActionSchedule',
366 'entity_value' => array(
367 'name' => 'entity_value',
368 'type' => CRM_Utils_Type
::T_STRING
,
369 'title' => ts('Entity Value') ,
370 'description' => 'Entity value',
372 'size' => CRM_Utils_Type
::HUGE
,
373 'table_name' => 'civicrm_action_schedule',
374 'entity' => 'ActionSchedule',
375 'bao' => 'CRM_Core_BAO_ActionSchedule',
378 'entity_status' => array(
379 'name' => 'entity_status',
380 'type' => CRM_Utils_Type
::T_STRING
,
381 'title' => ts('Entity Status') ,
382 'description' => 'Entity status',
384 'size' => CRM_Utils_Type
::BIG
,
385 'table_name' => 'civicrm_action_schedule',
386 'entity' => 'ActionSchedule',
387 'bao' => 'CRM_Core_BAO_ActionSchedule',
390 'start_action_offset' => array(
391 'name' => 'start_action_offset',
392 'type' => CRM_Utils_Type
::T_INT
,
393 'title' => ts('Start Action Offset') ,
394 'description' => 'Reminder Interval.',
395 'table_name' => 'civicrm_action_schedule',
396 'entity' => 'ActionSchedule',
397 'bao' => 'CRM_Core_BAO_ActionSchedule',
400 'start_action_unit' => array(
401 'name' => 'start_action_unit',
402 'type' => CRM_Utils_Type
::T_STRING
,
403 'title' => ts('Start Action Unit') ,
404 'description' => 'Time units for reminder.',
406 'size' => CRM_Utils_Type
::EIGHT
,
407 'table_name' => 'civicrm_action_schedule',
408 'entity' => 'ActionSchedule',
409 'bao' => 'CRM_Core_BAO_ActionSchedule',
414 'pseudoconstant' => array(
415 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
418 'start_action_condition' => array(
419 'name' => 'start_action_condition',
420 'type' => CRM_Utils_Type
::T_STRING
,
421 'title' => ts('Start Action Condition') ,
422 'description' => 'Reminder Action',
424 'size' => CRM_Utils_Type
::BIG
,
425 'table_name' => 'civicrm_action_schedule',
426 'entity' => 'ActionSchedule',
427 'bao' => 'CRM_Core_BAO_ActionSchedule',
430 'start_action_date' => array(
431 'name' => 'start_action_date',
432 'type' => CRM_Utils_Type
::T_STRING
,
433 'title' => ts('Start Action Date') ,
434 'description' => 'Entity date',
436 'size' => CRM_Utils_Type
::BIG
,
437 'table_name' => 'civicrm_action_schedule',
438 'entity' => 'ActionSchedule',
439 'bao' => 'CRM_Core_BAO_ActionSchedule',
442 'is_repeat' => array(
443 'name' => 'is_repeat',
444 'type' => CRM_Utils_Type
::T_BOOLEAN
,
445 'title' => ts('Repeat?') ,
446 'table_name' => 'civicrm_action_schedule',
447 'entity' => 'ActionSchedule',
448 'bao' => 'CRM_Core_BAO_ActionSchedule',
451 'repetition_frequency_unit' => array(
452 'name' => 'repetition_frequency_unit',
453 'type' => CRM_Utils_Type
::T_STRING
,
454 'title' => ts('Repetition Frequency Unit') ,
455 'description' => 'Time units for repetition of reminder.',
457 'size' => CRM_Utils_Type
::EIGHT
,
458 'table_name' => 'civicrm_action_schedule',
459 'entity' => 'ActionSchedule',
460 'bao' => 'CRM_Core_BAO_ActionSchedule',
465 'pseudoconstant' => array(
466 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
469 'repetition_frequency_interval' => array(
470 'name' => 'repetition_frequency_interval',
471 'type' => CRM_Utils_Type
::T_INT
,
472 'title' => ts('Repetition Frequency Interval') ,
473 'description' => 'Time interval for repeating the reminder.',
474 'table_name' => 'civicrm_action_schedule',
475 'entity' => 'ActionSchedule',
476 'bao' => 'CRM_Core_BAO_ActionSchedule',
479 'end_frequency_unit' => array(
480 'name' => 'end_frequency_unit',
481 'type' => CRM_Utils_Type
::T_STRING
,
482 'title' => ts('End Frequency Unit') ,
483 'description' => 'Time units till repetition of reminder.',
485 'size' => CRM_Utils_Type
::EIGHT
,
486 'table_name' => 'civicrm_action_schedule',
487 'entity' => 'ActionSchedule',
488 'bao' => 'CRM_Core_BAO_ActionSchedule',
493 'pseudoconstant' => array(
494 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
497 'end_frequency_interval' => array(
498 'name' => 'end_frequency_interval',
499 'type' => CRM_Utils_Type
::T_INT
,
500 'title' => ts('End Frequency Interval') ,
501 'description' => 'Time interval till repeating the reminder.',
502 'table_name' => 'civicrm_action_schedule',
503 'entity' => 'ActionSchedule',
504 'bao' => 'CRM_Core_BAO_ActionSchedule',
507 'end_action' => array(
508 'name' => 'end_action',
509 'type' => CRM_Utils_Type
::T_STRING
,
510 'title' => ts('End Action') ,
511 'description' => 'Reminder Action till repeating the reminder.',
513 'size' => CRM_Utils_Type
::MEDIUM
,
514 'table_name' => 'civicrm_action_schedule',
515 'entity' => 'ActionSchedule',
516 'bao' => 'CRM_Core_BAO_ActionSchedule',
520 'name' => 'end_date',
521 'type' => CRM_Utils_Type
::T_STRING
,
522 'title' => ts('End Date') ,
523 'description' => 'Entity end date',
525 'size' => CRM_Utils_Type
::BIG
,
526 'table_name' => 'civicrm_action_schedule',
527 'entity' => 'ActionSchedule',
528 'bao' => 'CRM_Core_BAO_ActionSchedule',
531 'is_active' => array(
532 'name' => 'is_active',
533 'type' => CRM_Utils_Type
::T_BOOLEAN
,
534 'title' => ts('Schedule is Active?') ,
535 'description' => 'Is this option active?',
537 'table_name' => 'civicrm_action_schedule',
538 'entity' => 'ActionSchedule',
539 'bao' => 'CRM_Core_BAO_ActionSchedule',
542 'recipient_manual' => array(
543 'name' => 'recipient_manual',
544 'type' => CRM_Utils_Type
::T_STRING
,
545 'title' => ts('Recipient Manual') ,
546 'description' => 'Contact IDs to which reminder should be sent.',
548 'size' => CRM_Utils_Type
::HUGE
,
549 'table_name' => 'civicrm_action_schedule',
550 'entity' => 'ActionSchedule',
551 'bao' => 'CRM_Core_BAO_ActionSchedule',
554 'recipient_listing' => array(
555 'name' => 'recipient_listing',
556 'type' => CRM_Utils_Type
::T_STRING
,
557 'title' => ts('Recipient Listing') ,
558 'description' => 'listing based on recipient field.',
560 'size' => CRM_Utils_Type
::HUGE
,
561 'table_name' => 'civicrm_action_schedule',
562 'entity' => 'ActionSchedule',
563 'bao' => 'CRM_Core_BAO_ActionSchedule',
566 'body_text' => array(
567 'name' => 'body_text',
568 'type' => CRM_Utils_Type
::T_LONGTEXT
,
569 'title' => ts('Reminder Text') ,
570 'description' => 'Body of the mailing in text format.',
571 'table_name' => 'civicrm_action_schedule',
572 'entity' => 'ActionSchedule',
573 'bao' => 'CRM_Core_BAO_ActionSchedule',
576 'body_html' => array(
577 'name' => 'body_html',
578 'type' => CRM_Utils_Type
::T_LONGTEXT
,
579 'title' => ts('Reminder HTML') ,
580 'description' => 'Body of the mailing in html format.',
581 'table_name' => 'civicrm_action_schedule',
582 'entity' => 'ActionSchedule',
583 'bao' => 'CRM_Core_BAO_ActionSchedule',
586 'sms_body_text' => array(
587 'name' => 'sms_body_text',
588 'type' => CRM_Utils_Type
::T_LONGTEXT
,
589 'title' => ts('SMS Reminder Text') ,
590 'description' => 'Content of the SMS text.',
591 'table_name' => 'civicrm_action_schedule',
592 'entity' => 'ActionSchedule',
593 'bao' => 'CRM_Core_BAO_ActionSchedule',
598 'type' => CRM_Utils_Type
::T_STRING
,
599 'title' => ts('Reminder Subject') ,
600 'description' => 'Subject of mailing',
602 'size' => CRM_Utils_Type
::HUGE
,
603 'table_name' => 'civicrm_action_schedule',
604 'entity' => 'ActionSchedule',
605 'bao' => 'CRM_Core_BAO_ActionSchedule',
608 'record_activity' => array(
609 'name' => 'record_activity',
610 'type' => CRM_Utils_Type
::T_BOOLEAN
,
611 'title' => ts('Record Activity for Reminder?') ,
612 'description' => 'Record Activity for this reminder?',
614 'table_name' => 'civicrm_action_schedule',
615 'entity' => 'ActionSchedule',
616 'bao' => 'CRM_Core_BAO_ActionSchedule',
619 'mapping_id' => array(
620 'name' => 'mapping_id',
621 'type' => CRM_Utils_Type
::T_STRING
,
622 'title' => ts('Reminder Mapping') ,
623 'description' => 'Name/ID of the mapping to use on this table',
625 'size' => CRM_Utils_Type
::BIG
,
626 'table_name' => 'civicrm_action_schedule',
627 'entity' => 'ActionSchedule',
628 'bao' => 'CRM_Core_BAO_ActionSchedule',
632 'name' => 'group_id',
633 'type' => CRM_Utils_Type
::T_INT
,
634 'title' => ts('Reminder Group') ,
635 'description' => 'FK to Group',
636 'table_name' => 'civicrm_action_schedule',
637 'entity' => 'ActionSchedule',
638 'bao' => 'CRM_Core_BAO_ActionSchedule',
640 'FKClassName' => 'CRM_Contact_DAO_Group',
644 'pseudoconstant' => array(
645 'table' => 'civicrm_group',
647 'labelColumn' => 'title',
650 'msg_template_id' => array(
651 'name' => 'msg_template_id',
652 'type' => CRM_Utils_Type
::T_INT
,
653 'title' => ts('Reminder Template') ,
654 'description' => 'FK to the message template.',
655 'table_name' => 'civicrm_action_schedule',
656 'entity' => 'ActionSchedule',
657 'bao' => 'CRM_Core_BAO_ActionSchedule',
659 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
661 'sms_template_id' => array(
662 'name' => 'sms_template_id',
663 'type' => CRM_Utils_Type
::T_INT
,
664 'title' => ts('SMS Reminder Template') ,
665 'description' => 'FK to the message template.',
666 'table_name' => 'civicrm_action_schedule',
667 'entity' => 'ActionSchedule',
668 'bao' => 'CRM_Core_BAO_ActionSchedule',
670 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
672 'absolute_date' => array(
673 'name' => 'absolute_date',
674 'type' => CRM_Utils_Type
::T_DATE
,
675 'title' => ts('Fixed Date for Reminder') ,
676 'description' => 'Date on which the reminder be sent.',
677 'table_name' => 'civicrm_action_schedule',
678 'entity' => 'ActionSchedule',
679 'bao' => 'CRM_Core_BAO_ActionSchedule',
682 'from_name' => array(
683 'name' => 'from_name',
684 'type' => CRM_Utils_Type
::T_STRING
,
685 'title' => ts('Reminder from Name') ,
686 'description' => 'Name in "from" field',
688 'size' => CRM_Utils_Type
::HUGE
,
689 'table_name' => 'civicrm_action_schedule',
690 'entity' => 'ActionSchedule',
691 'bao' => 'CRM_Core_BAO_ActionSchedule',
694 'from_email' => array(
695 'name' => 'from_email',
696 'type' => CRM_Utils_Type
::T_STRING
,
697 'title' => ts('Reminder From Email') ,
698 'description' => 'Email address in "from" field',
700 'size' => CRM_Utils_Type
::HUGE
,
701 'table_name' => 'civicrm_action_schedule',
702 'entity' => 'ActionSchedule',
703 'bao' => 'CRM_Core_BAO_ActionSchedule',
708 'type' => CRM_Utils_Type
::T_STRING
,
709 'title' => ts('Message Mode') ,
710 'description' => 'Send the message as email or sms or both.',
712 'size' => CRM_Utils_Type
::HUGE
,
713 'default' => 'Email',
714 'table_name' => 'civicrm_action_schedule',
715 'entity' => 'ActionSchedule',
716 'bao' => 'CRM_Core_BAO_ActionSchedule',
721 'pseudoconstant' => array(
722 'optionGroupName' => 'msg_mode',
723 'optionEditPath' => 'civicrm/admin/options/msg_mode',
726 'sms_provider_id' => array(
727 'name' => 'sms_provider_id',
728 'type' => CRM_Utils_Type
::T_INT
,
729 'title' => ts('SMS Provider') ,
730 'table_name' => 'civicrm_action_schedule',
731 'entity' => 'ActionSchedule',
732 'bao' => 'CRM_Core_BAO_ActionSchedule',
734 'FKClassName' => 'CRM_SMS_DAO_Provider',
740 'name' => 'used_for',
741 'type' => CRM_Utils_Type
::T_STRING
,
742 'title' => ts('Used For') ,
743 'description' => 'Used for repeating entity',
745 'size' => CRM_Utils_Type
::BIG
,
746 'table_name' => 'civicrm_action_schedule',
747 'entity' => 'ActionSchedule',
748 'bao' => 'CRM_Core_BAO_ActionSchedule',
751 'filter_contact_language' => array(
752 'name' => 'filter_contact_language',
753 'type' => CRM_Utils_Type
::T_STRING
,
754 'title' => ts('Filter Contact Language') ,
755 'description' => 'Used for multilingual installation',
757 'size' => CRM_Utils_Type
::HUGE
,
758 'table_name' => 'civicrm_action_schedule',
759 'entity' => 'ActionSchedule',
760 'bao' => 'CRM_Core_BAO_ActionSchedule',
763 'communication_language' => array(
764 'name' => 'communication_language',
765 'type' => CRM_Utils_Type
::T_STRING
,
766 'title' => ts('Communication Language') ,
767 'description' => 'Used for multilingual installation',
769 'size' => CRM_Utils_Type
::EIGHT
,
770 'table_name' => 'civicrm_action_schedule',
771 'entity' => 'ActionSchedule',
772 'bao' => 'CRM_Core_BAO_ActionSchedule',
776 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
778 return Civi
::$statics[__CLASS__
]['fields'];
781 * Return a mapping from field-name to the corresponding key (as used in fields()).
784 * Array(string $name => string $uniqueName).
786 static function &fieldKeys() {
787 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
788 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
790 return Civi
::$statics[__CLASS__
]['fieldKeys'];
793 * Returns the names of this table
797 static function getTableName() {
798 return self
::$_tableName;
801 * Returns if this table needs to be logged
809 * Returns the list of fields that can be imported
811 * @param bool $prefix
815 static function &import($prefix = false) {
816 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'action_schedule', $prefix, array());
820 * Returns the list of fields that can be exported
822 * @param bool $prefix
826 static function &export($prefix = false) {
827 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'action_schedule', $prefix, array());
831 * Returns the list of indices
833 public static function indices($localize = TRUE) {
835 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;