CRM-19925 Updated DAO files
[civicrm-core.git] / CRM / Core / DAO / ActionSchedule.php
CommitLineData
e501603b
TO
1<?php
2/*
3+--------------------------------------------------------------------+
4| CiviCRM version 4.7 |
5+--------------------------------------------------------------------+
0f03f337 6| Copyright CiviCRM LLC (c) 2004-2017 |
e501603b
TO
7+--------------------------------------------------------------------+
8| This file is a part of CiviCRM. |
9| |
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. |
13| |
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. |
18| |
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+--------------------------------------------------------------------+
26*/
27/**
28 * @package CRM
0f03f337 29 * @copyright CiviCRM LLC (c) 2004-2017
e501603b
TO
30 *
31 * Generated from xml/schema/CRM/Core/ActionSchedule.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
522a26c9 33 * (GenCodeChecksum:b2eee0985301a53fa1b3f716da197103)
e501603b
TO
34 */
35require_once 'CRM/Core/DAO.php';
36require_once 'CRM/Utils/Type.php';
f41f0342 37/**
38 * CRM_Core_DAO_ActionSchedule constructor.
39 */
e501603b
TO
40class CRM_Core_DAO_ActionSchedule extends CRM_Core_DAO {
41 /**
f41f0342 42 * Static instance to hold the table name.
e501603b
TO
43 *
44 * @var string
45 */
46 static $_tableName = 'civicrm_action_schedule';
e501603b 47 /**
f41f0342 48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
e501603b
TO
49 *
50 * @var boolean
51 */
52 static $_log = false;
53 /**
54 *
55 * @var int unsigned
56 */
57 public $id;
58 /**
59 * Name of the action(reminder)
60 *
61 * @var string
62 */
63 public $name;
64 /**
65 * Title of the action(reminder)
66 *
67 * @var string
68 */
69 public $title;
70 /**
71 * Recipient
72 *
73 * @var string
74 */
75 public $recipient;
76 /**
77 * Is this the recipient criteria limited to OR in addition to?
78 *
79 * @var boolean
80 */
81 public $limit_to;
82 /**
83 * Entity value
84 *
85 * @var string
86 */
87 public $entity_value;
88 /**
89 * Entity status
90 *
91 * @var string
92 */
93 public $entity_status;
94 /**
95 * Reminder Interval.
96 *
97 * @var int unsigned
98 */
99 public $start_action_offset;
100 /**
101 * Time units for reminder.
102 *
103 * @var string
104 */
105 public $start_action_unit;
106 /**
107 * Reminder Action
108 *
109 * @var string
110 */
111 public $start_action_condition;
112 /**
113 * Entity date
114 *
115 * @var string
116 */
117 public $start_action_date;
118 /**
119 *
120 * @var boolean
121 */
122 public $is_repeat;
123 /**
124 * Time units for repetition of reminder.
125 *
126 * @var string
127 */
128 public $repetition_frequency_unit;
129 /**
130 * Time interval for repeating the reminder.
131 *
132 * @var int unsigned
133 */
134 public $repetition_frequency_interval;
135 /**
136 * Time units till repetition of reminder.
137 *
138 * @var string
139 */
140 public $end_frequency_unit;
141 /**
142 * Time interval till repeating the reminder.
143 *
144 * @var int unsigned
145 */
146 public $end_frequency_interval;
147 /**
148 * Reminder Action till repeating the reminder.
149 *
150 * @var string
151 */
152 public $end_action;
153 /**
154 * Entity end date
155 *
156 * @var string
157 */
158 public $end_date;
159 /**
160 * Is this option active?
161 *
162 * @var boolean
163 */
164 public $is_active;
165 /**
166 * Contact IDs to which reminder should be sent.
167 *
168 * @var string
169 */
170 public $recipient_manual;
171 /**
172 * listing based on recipient field.
173 *
174 * @var string
175 */
176 public $recipient_listing;
177 /**
178 * Body of the mailing in text format.
179 *
180 * @var longtext
181 */
182 public $body_text;
183 /**
184 * Body of the mailing in html format.
185 *
186 * @var longtext
187 */
188 public $body_html;
189 /**
190 * Content of the SMS text.
191 *
192 * @var longtext
193 */
194 public $sms_body_text;
195 /**
196 * Subject of mailing
197 *
198 * @var string
199 */
200 public $subject;
201 /**
202 * Record Activity for this reminder?
203 *
204 * @var boolean
205 */
206 public $record_activity;
207 /**
208 * Name/ID of the mapping to use on this table
209 *
210 * @var string
211 */
212 public $mapping_id;
213 /**
214 * FK to Group
215 *
216 * @var int unsigned
217 */
218 public $group_id;
219 /**
220 * FK to the message template.
221 *
222 * @var int unsigned
223 */
224 public $msg_template_id;
225 /**
226 * FK to the message template.
227 *
228 * @var int unsigned
229 */
230 public $sms_template_id;
231 /**
232 * Date on which the reminder be sent.
233 *
234 * @var date
235 */
236 public $absolute_date;
237 /**
238 * Name in "from" field
239 *
240 * @var string
241 */
242 public $from_name;
243 /**
244 * Email address in "from" field
245 *
246 * @var string
247 */
248 public $from_email;
249 /**
250 * Send the message as email or sms or both.
251 *
252 * @var string
253 */
254 public $mode;
255 /**
256 *
257 * @var int unsigned
258 */
259 public $sms_provider_id;
260 /**
261 * Used for repeating entity
262 *
263 * @var string
264 */
265 public $used_for;
266 /**
267 * Used for multilingual installation
268 *
269 * @var string
270 */
271 public $filter_contact_language;
272 /**
273 * Used for multilingual installation
274 *
275 * @var string
276 */
277 public $communication_language;
278 /**
f41f0342 279 * Class constructor.
e501603b
TO
280 */
281 function __construct() {
282 $this->__table = 'civicrm_action_schedule';
283 parent::__construct();
284 }
285 /**
f41f0342 286 * Returns foreign keys and entity references.
e501603b
TO
287 *
288 * @return array
289 * [CRM_Core_Reference_Interface]
290 */
291 static function getReferenceColumns() {
346aaaba
TO
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']);
e501603b 299 }
346aaaba 300 return Civi::$statics[__CLASS__]['links'];
e501603b
TO
301 }
302 /**
303 * Returns all the column names of this table
304 *
305 * @return array
306 */
307 static function &fields() {
346aaaba
TO
308 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
309 Civi::$statics[__CLASS__]['fields'] = array(
e501603b
TO
310 'id' => array(
311 'name' => 'id',
312 'type' => CRM_Utils_Type::T_INT,
313 'title' => ts('Action Schedule ID') ,
314 'required' => true,
522a26c9 315 'table_name' => 'civicrm_action_schedule',
316 'entity' => 'ActionSchedule',
317 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
318 ) ,
319 'name' => array(
320 'name' => 'name',
321 'type' => CRM_Utils_Type::T_STRING,
322 'title' => ts('Name') ,
323 'description' => 'Name of the action(reminder)',
324 'maxlength' => 64,
325 'size' => CRM_Utils_Type::BIG,
522a26c9 326 'table_name' => 'civicrm_action_schedule',
327 'entity' => 'ActionSchedule',
328 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
329 ) ,
330 'title' => array(
331 'name' => 'title',
332 'type' => CRM_Utils_Type::T_STRING,
333 'title' => ts('Title') ,
334 'description' => 'Title of the action(reminder)',
335 'maxlength' => 64,
336 'size' => CRM_Utils_Type::BIG,
522a26c9 337 'table_name' => 'civicrm_action_schedule',
338 'entity' => 'ActionSchedule',
339 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
340 ) ,
341 'recipient' => array(
342 'name' => 'recipient',
343 'type' => CRM_Utils_Type::T_STRING,
344 'title' => ts('Recipient') ,
345 'description' => 'Recipient',
346 'maxlength' => 64,
347 'size' => CRM_Utils_Type::BIG,
522a26c9 348 'table_name' => 'civicrm_action_schedule',
349 'entity' => 'ActionSchedule',
350 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
351 ) ,
352 'limit_to' => array(
353 'name' => 'limit_to',
354 'type' => CRM_Utils_Type::T_BOOLEAN,
355 'title' => ts('Limit To') ,
356 'description' => 'Is this the recipient criteria limited to OR in addition to?',
522a26c9 357 'table_name' => 'civicrm_action_schedule',
358 'entity' => 'ActionSchedule',
359 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
360 ) ,
361 'entity_value' => array(
362 'name' => 'entity_value',
363 'type' => CRM_Utils_Type::T_STRING,
364 'title' => ts('Entity Value') ,
365 'description' => 'Entity value',
366 'maxlength' => 255,
367 'size' => CRM_Utils_Type::HUGE,
522a26c9 368 'table_name' => 'civicrm_action_schedule',
369 'entity' => 'ActionSchedule',
370 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
371 ) ,
372 'entity_status' => array(
373 'name' => 'entity_status',
374 'type' => CRM_Utils_Type::T_STRING,
375 'title' => ts('Entity Status') ,
376 'description' => 'Entity status',
377 'maxlength' => 64,
378 'size' => CRM_Utils_Type::BIG,
522a26c9 379 'table_name' => 'civicrm_action_schedule',
380 'entity' => 'ActionSchedule',
381 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
382 ) ,
383 'start_action_offset' => array(
384 'name' => 'start_action_offset',
385 'type' => CRM_Utils_Type::T_INT,
386 'title' => ts('Start Action Offset') ,
387 'description' => 'Reminder Interval.',
522a26c9 388 'table_name' => 'civicrm_action_schedule',
389 'entity' => 'ActionSchedule',
390 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
391 ) ,
392 'start_action_unit' => array(
393 'name' => 'start_action_unit',
394 'type' => CRM_Utils_Type::T_STRING,
395 'title' => ts('Start Action Unit') ,
396 'description' => 'Time units for reminder.',
397 'maxlength' => 8,
398 'size' => CRM_Utils_Type::EIGHT,
522a26c9 399 'table_name' => 'civicrm_action_schedule',
400 'entity' => 'ActionSchedule',
401 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
402 'html' => array(
403 'type' => 'Select',
404 ) ,
405 'pseudoconstant' => array(
406 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
407 )
408 ) ,
409 'start_action_condition' => array(
410 'name' => 'start_action_condition',
411 'type' => CRM_Utils_Type::T_STRING,
412 'title' => ts('Start Action Condition') ,
413 'description' => 'Reminder Action',
ed6e48d9 414 'maxlength' => 64,
415 'size' => CRM_Utils_Type::BIG,
522a26c9 416 'table_name' => 'civicrm_action_schedule',
417 'entity' => 'ActionSchedule',
418 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
419 ) ,
420 'start_action_date' => array(
421 'name' => 'start_action_date',
422 'type' => CRM_Utils_Type::T_STRING,
423 'title' => ts('Start Action Date') ,
424 'description' => 'Entity date',
425 'maxlength' => 64,
426 'size' => CRM_Utils_Type::BIG,
522a26c9 427 'table_name' => 'civicrm_action_schedule',
428 'entity' => 'ActionSchedule',
429 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
430 ) ,
431 'is_repeat' => array(
432 'name' => 'is_repeat',
433 'type' => CRM_Utils_Type::T_BOOLEAN,
434 'title' => ts('Repeat?') ,
522a26c9 435 'table_name' => 'civicrm_action_schedule',
436 'entity' => 'ActionSchedule',
437 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
438 ) ,
439 'repetition_frequency_unit' => array(
440 'name' => 'repetition_frequency_unit',
441 'type' => CRM_Utils_Type::T_STRING,
442 'title' => ts('Repetition Frequency Unit') ,
443 'description' => 'Time units for repetition of reminder.',
444 'maxlength' => 8,
445 'size' => CRM_Utils_Type::EIGHT,
522a26c9 446 'table_name' => 'civicrm_action_schedule',
447 'entity' => 'ActionSchedule',
448 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
449 'html' => array(
450 'type' => 'Select',
451 ) ,
452 'pseudoconstant' => array(
453 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
454 )
455 ) ,
456 'repetition_frequency_interval' => array(
457 'name' => 'repetition_frequency_interval',
458 'type' => CRM_Utils_Type::T_INT,
459 'title' => ts('Repetition Frequency Interval') ,
460 'description' => 'Time interval for repeating the reminder.',
522a26c9 461 'table_name' => 'civicrm_action_schedule',
462 'entity' => 'ActionSchedule',
463 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
464 ) ,
465 'end_frequency_unit' => array(
466 'name' => 'end_frequency_unit',
467 'type' => CRM_Utils_Type::T_STRING,
468 'title' => ts('End Frequency Unit') ,
469 'description' => 'Time units till repetition of reminder.',
470 'maxlength' => 8,
471 'size' => CRM_Utils_Type::EIGHT,
522a26c9 472 'table_name' => 'civicrm_action_schedule',
473 'entity' => 'ActionSchedule',
474 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
475 'html' => array(
476 'type' => 'Select',
477 ) ,
478 'pseudoconstant' => array(
479 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
480 )
481 ) ,
482 'end_frequency_interval' => array(
483 'name' => 'end_frequency_interval',
484 'type' => CRM_Utils_Type::T_INT,
485 'title' => ts('End Frequency Interval') ,
486 'description' => 'Time interval till repeating the reminder.',
522a26c9 487 'table_name' => 'civicrm_action_schedule',
488 'entity' => 'ActionSchedule',
489 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
490 ) ,
491 'end_action' => array(
492 'name' => 'end_action',
493 'type' => CRM_Utils_Type::T_STRING,
494 'title' => ts('End Action') ,
495 'description' => 'Reminder Action till repeating the reminder.',
496 'maxlength' => 32,
497 'size' => CRM_Utils_Type::MEDIUM,
522a26c9 498 'table_name' => 'civicrm_action_schedule',
499 'entity' => 'ActionSchedule',
500 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
501 ) ,
502 'end_date' => array(
503 'name' => 'end_date',
504 'type' => CRM_Utils_Type::T_STRING,
505 'title' => ts('End Date') ,
506 'description' => 'Entity end date',
507 'maxlength' => 64,
508 'size' => CRM_Utils_Type::BIG,
522a26c9 509 'table_name' => 'civicrm_action_schedule',
510 'entity' => 'ActionSchedule',
511 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
512 ) ,
513 'is_active' => array(
514 'name' => 'is_active',
515 'type' => CRM_Utils_Type::T_BOOLEAN,
516 'title' => ts('Schedule is Active?') ,
517 'description' => 'Is this option active?',
518 'default' => '1',
522a26c9 519 'table_name' => 'civicrm_action_schedule',
520 'entity' => 'ActionSchedule',
521 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
522 ) ,
523 'recipient_manual' => array(
524 'name' => 'recipient_manual',
525 'type' => CRM_Utils_Type::T_STRING,
526 'title' => ts('Recipient Manual') ,
527 'description' => 'Contact IDs to which reminder should be sent.',
528 'maxlength' => 128,
529 'size' => CRM_Utils_Type::HUGE,
522a26c9 530 'table_name' => 'civicrm_action_schedule',
531 'entity' => 'ActionSchedule',
532 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
533 ) ,
534 'recipient_listing' => array(
535 'name' => 'recipient_listing',
536 'type' => CRM_Utils_Type::T_STRING,
537 'title' => ts('Recipient Listing') ,
538 'description' => 'listing based on recipient field.',
539 'maxlength' => 128,
540 'size' => CRM_Utils_Type::HUGE,
522a26c9 541 'table_name' => 'civicrm_action_schedule',
542 'entity' => 'ActionSchedule',
543 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
544 ) ,
545 'body_text' => array(
546 'name' => 'body_text',
547 'type' => CRM_Utils_Type::T_LONGTEXT,
548 'title' => ts('Reminder Text') ,
549 'description' => 'Body of the mailing in text format.',
522a26c9 550 'table_name' => 'civicrm_action_schedule',
551 'entity' => 'ActionSchedule',
552 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
553 ) ,
554 'body_html' => array(
555 'name' => 'body_html',
556 'type' => CRM_Utils_Type::T_LONGTEXT,
557 'title' => ts('Reminder HTML') ,
558 'description' => 'Body of the mailing in html format.',
522a26c9 559 'table_name' => 'civicrm_action_schedule',
560 'entity' => 'ActionSchedule',
561 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
562 ) ,
563 'sms_body_text' => array(
564 'name' => 'sms_body_text',
565 'type' => CRM_Utils_Type::T_LONGTEXT,
566 'title' => ts('SMS Reminder Text') ,
567 'description' => 'Content of the SMS text.',
522a26c9 568 'table_name' => 'civicrm_action_schedule',
569 'entity' => 'ActionSchedule',
570 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
571 ) ,
572 'subject' => array(
573 'name' => 'subject',
574 'type' => CRM_Utils_Type::T_STRING,
575 'title' => ts('Reminder Subject') ,
576 'description' => 'Subject of mailing',
577 'maxlength' => 128,
578 'size' => CRM_Utils_Type::HUGE,
522a26c9 579 'table_name' => 'civicrm_action_schedule',
580 'entity' => 'ActionSchedule',
581 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
582 ) ,
583 'record_activity' => array(
584 'name' => 'record_activity',
585 'type' => CRM_Utils_Type::T_BOOLEAN,
586 'title' => ts('Record Activity for Reminder?') ,
587 'description' => 'Record Activity for this reminder?',
588 'default' => 'NULL',
522a26c9 589 'table_name' => 'civicrm_action_schedule',
590 'entity' => 'ActionSchedule',
591 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
592 ) ,
593 'mapping_id' => array(
594 'name' => 'mapping_id',
595 'type' => CRM_Utils_Type::T_STRING,
596 'title' => ts('Reminder Mapping') ,
597 'description' => 'Name/ID of the mapping to use on this table',
598 'maxlength' => 64,
599 'size' => CRM_Utils_Type::BIG,
522a26c9 600 'table_name' => 'civicrm_action_schedule',
601 'entity' => 'ActionSchedule',
602 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
603 ) ,
604 'group_id' => array(
605 'name' => 'group_id',
606 'type' => CRM_Utils_Type::T_INT,
607 'title' => ts('Reminder Group') ,
608 'description' => 'FK to Group',
522a26c9 609 'table_name' => 'civicrm_action_schedule',
610 'entity' => 'ActionSchedule',
611 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
612 'FKClassName' => 'CRM_Contact_DAO_Group',
613 'html' => array(
614 'type' => 'Select',
615 ) ,
616 'pseudoconstant' => array(
617 'table' => 'civicrm_group',
618 'keyColumn' => 'id',
619 'labelColumn' => 'title',
620 )
621 ) ,
622 'msg_template_id' => array(
623 'name' => 'msg_template_id',
624 'type' => CRM_Utils_Type::T_INT,
625 'title' => ts('Reminder Template') ,
626 'description' => 'FK to the message template.',
522a26c9 627 'table_name' => 'civicrm_action_schedule',
628 'entity' => 'ActionSchedule',
629 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
630 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
631 ) ,
632 'sms_template_id' => array(
633 'name' => 'sms_template_id',
634 'type' => CRM_Utils_Type::T_INT,
635 'title' => ts('SMS Reminder Template') ,
636 'description' => 'FK to the message template.',
522a26c9 637 'table_name' => 'civicrm_action_schedule',
638 'entity' => 'ActionSchedule',
639 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
640 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
641 ) ,
642 'absolute_date' => array(
643 'name' => 'absolute_date',
644 'type' => CRM_Utils_Type::T_DATE,
645 'title' => ts('Fixed Date for Reminder') ,
646 'description' => 'Date on which the reminder be sent.',
522a26c9 647 'table_name' => 'civicrm_action_schedule',
648 'entity' => 'ActionSchedule',
649 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
650 ) ,
651 'from_name' => array(
652 'name' => 'from_name',
653 'type' => CRM_Utils_Type::T_STRING,
654 'title' => ts('Reminder from Name') ,
655 'description' => 'Name in "from" field',
656 'maxlength' => 255,
657 'size' => CRM_Utils_Type::HUGE,
522a26c9 658 'table_name' => 'civicrm_action_schedule',
659 'entity' => 'ActionSchedule',
660 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
661 ) ,
662 'from_email' => array(
663 'name' => 'from_email',
664 'type' => CRM_Utils_Type::T_STRING,
665 'title' => ts('Reminder From Email') ,
666 'description' => 'Email address in "from" field',
667 'maxlength' => 255,
668 'size' => CRM_Utils_Type::HUGE,
522a26c9 669 'table_name' => 'civicrm_action_schedule',
670 'entity' => 'ActionSchedule',
671 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
672 ) ,
673 'mode' => array(
674 'name' => 'mode',
675 'type' => CRM_Utils_Type::T_STRING,
676 'title' => ts('Message Mode') ,
677 'description' => 'Send the message as email or sms or both.',
678 'maxlength' => 128,
679 'size' => CRM_Utils_Type::HUGE,
680 'default' => 'Email',
522a26c9 681 'table_name' => 'civicrm_action_schedule',
682 'entity' => 'ActionSchedule',
683 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
684 'html' => array(
685 'type' => 'Select',
686 ) ,
687 'pseudoconstant' => array(
688 'optionGroupName' => 'msg_mode',
689 'optionEditPath' => 'civicrm/admin/options/msg_mode',
690 )
691 ) ,
692 'sms_provider_id' => array(
693 'name' => 'sms_provider_id',
694 'type' => CRM_Utils_Type::T_INT,
695 'title' => ts('SMS Provider') ,
522a26c9 696 'table_name' => 'civicrm_action_schedule',
697 'entity' => 'ActionSchedule',
698 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
699 'FKClassName' => 'CRM_SMS_DAO_Provider',
700 'html' => array(
701 'type' => 'Select',
702 ) ,
703 ) ,
704 'used_for' => array(
705 'name' => 'used_for',
706 'type' => CRM_Utils_Type::T_STRING,
707 'title' => ts('Used For') ,
708 'description' => 'Used for repeating entity',
709 'maxlength' => 64,
710 'size' => CRM_Utils_Type::BIG,
522a26c9 711 'table_name' => 'civicrm_action_schedule',
712 'entity' => 'ActionSchedule',
713 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
714 ) ,
715 'filter_contact_language' => array(
716 'name' => 'filter_contact_language',
717 'type' => CRM_Utils_Type::T_STRING,
718 'title' => ts('Filter Contact Language') ,
719 'description' => 'Used for multilingual installation',
720 'maxlength' => 128,
721 'size' => CRM_Utils_Type::HUGE,
522a26c9 722 'table_name' => 'civicrm_action_schedule',
723 'entity' => 'ActionSchedule',
724 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
725 ) ,
726 'communication_language' => array(
727 'name' => 'communication_language',
728 'type' => CRM_Utils_Type::T_STRING,
729 'title' => ts('Communication Language') ,
730 'description' => 'Used for multilingual installation',
731 'maxlength' => 8,
732 'size' => CRM_Utils_Type::EIGHT,
522a26c9 733 'table_name' => 'civicrm_action_schedule',
734 'entity' => 'ActionSchedule',
735 'bao' => 'CRM_Core_BAO_ActionSchedule',
e501603b
TO
736 ) ,
737 );
346aaaba 738 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 739 }
346aaaba 740 return Civi::$statics[__CLASS__]['fields'];
e501603b
TO
741 }
742 /**
bd8e0b14 743 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
744 *
745 * @return array
bd8e0b14 746 * Array(string $name => string $uniqueName).
e501603b
TO
747 */
748 static function &fieldKeys() {
bd8e0b14
TO
749 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
750 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 751 }
bd8e0b14 752 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b
TO
753 }
754 /**
755 * Returns the names of this table
756 *
757 * @return string
758 */
759 static function getTableName() {
760 return self::$_tableName;
761 }
762 /**
763 * Returns if this table needs to be logged
764 *
765 * @return boolean
766 */
767 function getLog() {
768 return self::$_log;
769 }
770 /**
771 * Returns the list of fields that can be imported
772 *
773 * @param bool $prefix
774 *
775 * @return array
776 */
777 static function &import($prefix = false) {
60808919
TO
778 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'action_schedule', $prefix, array());
779 return $r;
e501603b
TO
780 }
781 /**
782 * Returns the list of fields that can be exported
783 *
784 * @param bool $prefix
785 *
786 * @return array
787 */
788 static function &export($prefix = false) {
60808919
TO
789 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'action_schedule', $prefix, array());
790 return $r;
e501603b
TO
791 }
792}