3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
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-2016
31 * Generated from xml/schema/CRM/Core/ActionSchedule.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:06960967b276e6b2b7cd31a7ded61c03)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_ActionSchedule
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_action_schedule';
45 * static value to see if we should log any modifications to
46 * this table in the civicrm_log table
57 * Name of the action(reminder)
63 * Title of the action(reminder)
75 * Is this the recipient criteria limited to OR in addition to?
91 public $entity_status;
97 public $start_action_offset;
99 * Time units for reminder.
103 public $start_action_unit;
109 public $start_action_condition;
115 public $start_action_date;
122 * Time units for repetition of reminder.
126 public $repetition_frequency_unit;
128 * Time interval for repeating the reminder.
132 public $repetition_frequency_interval;
134 * Time units till repetition of reminder.
138 public $end_frequency_unit;
140 * Time interval till repeating the reminder.
144 public $end_frequency_interval;
146 * Reminder Action till repeating the reminder.
158 * Is this option active?
164 * Contact IDs to which reminder should be sent.
168 public $recipient_manual;
170 * listing based on recipient field.
174 public $recipient_listing;
176 * Body of the mailing in text format.
182 * Body of the mailing in html format.
188 * Content of the SMS text.
192 public $sms_body_text;
200 * Record Activity for this reminder?
204 public $record_activity;
206 * Name/ID of the mapping to use on this table
218 * FK to the message template.
222 public $msg_template_id;
224 * FK to the message template.
228 public $sms_template_id;
230 * Date on which the reminder be sent.
234 public $absolute_date;
236 * Name in "from" field
242 * Email address in "from" field
248 * Send the message as email or sms or both.
257 public $sms_provider_id;
259 * Used for repeating entity
265 * Used for multilingual installation
269 public $filter_contact_language;
271 * Used for multilingual installation
275 public $communication_language;
279 * @return civicrm_action_schedule
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') ,
318 'type' => CRM_Utils_Type
::T_STRING
,
319 'title' => ts('Name') ,
320 'description' => 'Name of the action(reminder)',
322 'size' => CRM_Utils_Type
::BIG
,
326 'type' => CRM_Utils_Type
::T_STRING
,
327 'title' => ts('Title') ,
328 'description' => 'Title of the action(reminder)',
330 'size' => CRM_Utils_Type
::BIG
,
332 'recipient' => array(
333 'name' => 'recipient',
334 'type' => CRM_Utils_Type
::T_STRING
,
335 'title' => ts('Recipient') ,
336 'description' => 'Recipient',
338 'size' => CRM_Utils_Type
::BIG
,
341 'name' => 'limit_to',
342 'type' => CRM_Utils_Type
::T_BOOLEAN
,
343 'title' => ts('Limit To') ,
344 'description' => 'Is this the recipient criteria limited to OR in addition to?',
346 'entity_value' => array(
347 'name' => 'entity_value',
348 'type' => CRM_Utils_Type
::T_STRING
,
349 'title' => ts('Entity Value') ,
350 'description' => 'Entity value',
352 'size' => CRM_Utils_Type
::HUGE
,
354 'entity_status' => array(
355 'name' => 'entity_status',
356 'type' => CRM_Utils_Type
::T_STRING
,
357 'title' => ts('Entity Status') ,
358 'description' => 'Entity status',
360 'size' => CRM_Utils_Type
::BIG
,
362 'start_action_offset' => array(
363 'name' => 'start_action_offset',
364 'type' => CRM_Utils_Type
::T_INT
,
365 'title' => ts('Start Action Offset') ,
366 'description' => 'Reminder Interval.',
368 'start_action_unit' => array(
369 'name' => 'start_action_unit',
370 'type' => CRM_Utils_Type
::T_STRING
,
371 'title' => ts('Start Action Unit') ,
372 'description' => 'Time units for reminder.',
374 'size' => CRM_Utils_Type
::EIGHT
,
378 'pseudoconstant' => array(
379 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
382 'start_action_condition' => array(
383 'name' => 'start_action_condition',
384 'type' => CRM_Utils_Type
::T_STRING
,
385 'title' => ts('Start Action Condition') ,
386 'description' => 'Reminder Action',
388 'size' => CRM_Utils_Type
::BIG
,
390 'start_action_date' => array(
391 'name' => 'start_action_date',
392 'type' => CRM_Utils_Type
::T_STRING
,
393 'title' => ts('Start Action Date') ,
394 'description' => 'Entity date',
396 'size' => CRM_Utils_Type
::BIG
,
398 'is_repeat' => array(
399 'name' => 'is_repeat',
400 'type' => CRM_Utils_Type
::T_BOOLEAN
,
401 'title' => ts('Repeat?') ,
403 'repetition_frequency_unit' => array(
404 'name' => 'repetition_frequency_unit',
405 'type' => CRM_Utils_Type
::T_STRING
,
406 'title' => ts('Repetition Frequency Unit') ,
407 'description' => 'Time units for repetition of reminder.',
409 'size' => CRM_Utils_Type
::EIGHT
,
413 'pseudoconstant' => array(
414 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
417 'repetition_frequency_interval' => array(
418 'name' => 'repetition_frequency_interval',
419 'type' => CRM_Utils_Type
::T_INT
,
420 'title' => ts('Repetition Frequency Interval') ,
421 'description' => 'Time interval for repeating the reminder.',
423 'end_frequency_unit' => array(
424 'name' => 'end_frequency_unit',
425 'type' => CRM_Utils_Type
::T_STRING
,
426 'title' => ts('End Frequency Unit') ,
427 'description' => 'Time units till repetition of reminder.',
429 'size' => CRM_Utils_Type
::EIGHT
,
433 'pseudoconstant' => array(
434 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
437 'end_frequency_interval' => array(
438 'name' => 'end_frequency_interval',
439 'type' => CRM_Utils_Type
::T_INT
,
440 'title' => ts('End Frequency Interval') ,
441 'description' => 'Time interval till repeating the reminder.',
443 'end_action' => array(
444 'name' => 'end_action',
445 'type' => CRM_Utils_Type
::T_STRING
,
446 'title' => ts('End Action') ,
447 'description' => 'Reminder Action till repeating the reminder.',
449 'size' => CRM_Utils_Type
::MEDIUM
,
452 'name' => 'end_date',
453 'type' => CRM_Utils_Type
::T_STRING
,
454 'title' => ts('End Date') ,
455 'description' => 'Entity end date',
457 'size' => CRM_Utils_Type
::BIG
,
459 'is_active' => array(
460 'name' => 'is_active',
461 'type' => CRM_Utils_Type
::T_BOOLEAN
,
462 'title' => ts('Schedule is Active?') ,
463 'description' => 'Is this option active?',
466 'recipient_manual' => array(
467 'name' => 'recipient_manual',
468 'type' => CRM_Utils_Type
::T_STRING
,
469 'title' => ts('Recipient Manual') ,
470 'description' => 'Contact IDs to which reminder should be sent.',
472 'size' => CRM_Utils_Type
::HUGE
,
474 'recipient_listing' => array(
475 'name' => 'recipient_listing',
476 'type' => CRM_Utils_Type
::T_STRING
,
477 'title' => ts('Recipient Listing') ,
478 'description' => 'listing based on recipient field.',
480 'size' => CRM_Utils_Type
::HUGE
,
482 'body_text' => array(
483 'name' => 'body_text',
484 'type' => CRM_Utils_Type
::T_LONGTEXT
,
485 'title' => ts('Reminder Text') ,
486 'description' => 'Body of the mailing in text format.',
488 'body_html' => array(
489 'name' => 'body_html',
490 'type' => CRM_Utils_Type
::T_LONGTEXT
,
491 'title' => ts('Reminder HTML') ,
492 'description' => 'Body of the mailing in html format.',
494 'sms_body_text' => array(
495 'name' => 'sms_body_text',
496 'type' => CRM_Utils_Type
::T_LONGTEXT
,
497 'title' => ts('SMS Reminder Text') ,
498 'description' => 'Content of the SMS text.',
502 'type' => CRM_Utils_Type
::T_STRING
,
503 'title' => ts('Reminder Subject') ,
504 'description' => 'Subject of mailing',
506 'size' => CRM_Utils_Type
::HUGE
,
508 'record_activity' => array(
509 'name' => 'record_activity',
510 'type' => CRM_Utils_Type
::T_BOOLEAN
,
511 'title' => ts('Record Activity for Reminder?') ,
512 'description' => 'Record Activity for this reminder?',
515 'mapping_id' => array(
516 'name' => 'mapping_id',
517 'type' => CRM_Utils_Type
::T_STRING
,
518 'title' => ts('Reminder Mapping') ,
519 'description' => 'Name/ID of the mapping to use on this table',
521 'size' => CRM_Utils_Type
::BIG
,
524 'name' => 'group_id',
525 'type' => CRM_Utils_Type
::T_INT
,
526 'title' => ts('Reminder Group') ,
527 'description' => 'FK to Group',
528 'FKClassName' => 'CRM_Contact_DAO_Group',
532 'pseudoconstant' => array(
533 'table' => 'civicrm_group',
535 'labelColumn' => 'title',
538 'msg_template_id' => array(
539 'name' => 'msg_template_id',
540 'type' => CRM_Utils_Type
::T_INT
,
541 'title' => ts('Reminder Template') ,
542 'description' => 'FK to the message template.',
543 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
545 'sms_template_id' => array(
546 'name' => 'sms_template_id',
547 'type' => CRM_Utils_Type
::T_INT
,
548 'title' => ts('SMS Reminder Template') ,
549 'description' => 'FK to the message template.',
550 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
552 'absolute_date' => array(
553 'name' => 'absolute_date',
554 'type' => CRM_Utils_Type
::T_DATE
,
555 'title' => ts('Fixed Date for Reminder') ,
556 'description' => 'Date on which the reminder be sent.',
558 'from_name' => array(
559 'name' => 'from_name',
560 'type' => CRM_Utils_Type
::T_STRING
,
561 'title' => ts('Reminder from Name') ,
562 'description' => 'Name in "from" field',
564 'size' => CRM_Utils_Type
::HUGE
,
566 'from_email' => array(
567 'name' => 'from_email',
568 'type' => CRM_Utils_Type
::T_STRING
,
569 'title' => ts('Reminder From Email') ,
570 'description' => 'Email address in "from" field',
572 'size' => CRM_Utils_Type
::HUGE
,
576 'type' => CRM_Utils_Type
::T_STRING
,
577 'title' => ts('Message Mode') ,
578 'description' => 'Send the message as email or sms or both.',
580 'size' => CRM_Utils_Type
::HUGE
,
581 'default' => 'Email',
585 'pseudoconstant' => array(
586 'optionGroupName' => 'msg_mode',
587 'optionEditPath' => 'civicrm/admin/options/msg_mode',
590 'sms_provider_id' => array(
591 'name' => 'sms_provider_id',
592 'type' => CRM_Utils_Type
::T_INT
,
593 'title' => ts('SMS Provider') ,
594 'FKClassName' => 'CRM_SMS_DAO_Provider',
600 'name' => 'used_for',
601 'type' => CRM_Utils_Type
::T_STRING
,
602 'title' => ts('Used For') ,
603 'description' => 'Used for repeating entity',
605 'size' => CRM_Utils_Type
::BIG
,
607 'filter_contact_language' => array(
608 'name' => 'filter_contact_language',
609 'type' => CRM_Utils_Type
::T_STRING
,
610 'title' => ts('Filter Contact Language') ,
611 'description' => 'Used for multilingual installation',
613 'size' => CRM_Utils_Type
::HUGE
,
615 'communication_language' => array(
616 'name' => 'communication_language',
617 'type' => CRM_Utils_Type
::T_STRING
,
618 'title' => ts('Communication Language') ,
619 'description' => 'Used for multilingual installation',
621 'size' => CRM_Utils_Type
::EIGHT
,
624 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
626 return Civi
::$statics[__CLASS__
]['fields'];
629 * Return a mapping from field-name to the corresponding key (as used in fields()).
632 * Array(string $name => string $uniqueName).
634 static function &fieldKeys() {
635 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
636 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
638 return Civi
::$statics[__CLASS__
]['fieldKeys'];
641 * Returns the names of this table
645 static function getTableName() {
646 return self
::$_tableName;
649 * Returns if this table needs to be logged
657 * Returns the list of fields that can be imported
659 * @param bool $prefix
663 static function &import($prefix = false) {
664 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'action_schedule', $prefix, array());
668 * Returns the list of fields that can be exported
670 * @param bool $prefix
674 static function &export($prefix = false) {
675 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'action_schedule', $prefix, array());