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