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