Merge pull request #11304 from JMAConsulting/CRM-21461
[civicrm-core.git] / CRM / Core / DAO / ActionSchedule.php
1 <?php
2
3 /**
4 * @package CRM
5 * @copyright CiviCRM LLC (c) 2004-2017
6 *
7 * Generated from xml/schema/CRM/Core/ActionSchedule.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:d158b2da297ca83e4210a3fa0da8d5eb)
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' => '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' => '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' => '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' => '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' => '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' => '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' => 'Reminder Interval.',
410 'table_name' => 'civicrm_action_schedule',
411 'entity' => 'ActionSchedule',
412 'bao' => 'CRM_Core_BAO_ActionSchedule',
413 'localizable' => 0,
414 ],
415 'start_action_unit' => [
416 'name' => 'start_action_unit',
417 'type' => CRM_Utils_Type::T_STRING,
418 'title' => ts('Start Action Unit'),
419 'description' => 'Time units for reminder.',
420 'maxlength' => 8,
421 'size' => CRM_Utils_Type::EIGHT,
422 'table_name' => 'civicrm_action_schedule',
423 'entity' => 'ActionSchedule',
424 'bao' => 'CRM_Core_BAO_ActionSchedule',
425 'localizable' => 0,
426 'html' => [
427 'type' => 'Select',
428 ],
429 'pseudoconstant' => [
430 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
431 ]
432 ],
433 'start_action_condition' => [
434 'name' => 'start_action_condition',
435 'type' => CRM_Utils_Type::T_STRING,
436 'title' => ts('Start Action Condition'),
437 'description' => 'Reminder Action',
438 'maxlength' => 64,
439 'size' => CRM_Utils_Type::BIG,
440 'table_name' => 'civicrm_action_schedule',
441 'entity' => 'ActionSchedule',
442 'bao' => 'CRM_Core_BAO_ActionSchedule',
443 'localizable' => 0,
444 ],
445 'start_action_date' => [
446 'name' => 'start_action_date',
447 'type' => CRM_Utils_Type::T_STRING,
448 'title' => ts('Start Action Date'),
449 'description' => 'Entity date',
450 'maxlength' => 64,
451 'size' => CRM_Utils_Type::BIG,
452 'table_name' => 'civicrm_action_schedule',
453 'entity' => 'ActionSchedule',
454 'bao' => 'CRM_Core_BAO_ActionSchedule',
455 'localizable' => 0,
456 ],
457 'is_repeat' => [
458 'name' => 'is_repeat',
459 'type' => CRM_Utils_Type::T_BOOLEAN,
460 'title' => ts('Repeat?'),
461 'table_name' => 'civicrm_action_schedule',
462 'entity' => 'ActionSchedule',
463 'bao' => 'CRM_Core_BAO_ActionSchedule',
464 'localizable' => 0,
465 ],
466 'repetition_frequency_unit' => [
467 'name' => 'repetition_frequency_unit',
468 'type' => CRM_Utils_Type::T_STRING,
469 'title' => ts('Repetition Frequency Unit'),
470 'description' => 'Time units for repetition of reminder.',
471 'maxlength' => 8,
472 'size' => CRM_Utils_Type::EIGHT,
473 'table_name' => 'civicrm_action_schedule',
474 'entity' => 'ActionSchedule',
475 'bao' => 'CRM_Core_BAO_ActionSchedule',
476 'localizable' => 0,
477 'html' => [
478 'type' => 'Select',
479 ],
480 'pseudoconstant' => [
481 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
482 ]
483 ],
484 'repetition_frequency_interval' => [
485 'name' => 'repetition_frequency_interval',
486 'type' => CRM_Utils_Type::T_INT,
487 'title' => ts('Repetition Frequency Interval'),
488 'description' => 'Time interval for repeating the reminder.',
489 'table_name' => 'civicrm_action_schedule',
490 'entity' => 'ActionSchedule',
491 'bao' => 'CRM_Core_BAO_ActionSchedule',
492 'localizable' => 0,
493 ],
494 'end_frequency_unit' => [
495 'name' => 'end_frequency_unit',
496 'type' => CRM_Utils_Type::T_STRING,
497 'title' => ts('End Frequency Unit'),
498 'description' => 'Time units till repetition of reminder.',
499 'maxlength' => 8,
500 'size' => CRM_Utils_Type::EIGHT,
501 'table_name' => 'civicrm_action_schedule',
502 'entity' => 'ActionSchedule',
503 'bao' => 'CRM_Core_BAO_ActionSchedule',
504 'localizable' => 0,
505 'html' => [
506 'type' => 'Select',
507 ],
508 'pseudoconstant' => [
509 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
510 ]
511 ],
512 'end_frequency_interval' => [
513 'name' => 'end_frequency_interval',
514 'type' => CRM_Utils_Type::T_INT,
515 'title' => ts('End Frequency Interval'),
516 'description' => 'Time interval till repeating the reminder.',
517 'table_name' => 'civicrm_action_schedule',
518 'entity' => 'ActionSchedule',
519 'bao' => 'CRM_Core_BAO_ActionSchedule',
520 'localizable' => 0,
521 ],
522 'end_action' => [
523 'name' => 'end_action',
524 'type' => CRM_Utils_Type::T_STRING,
525 'title' => ts('End Action'),
526 'description' => 'Reminder Action till repeating the reminder.',
527 'maxlength' => 32,
528 'size' => CRM_Utils_Type::MEDIUM,
529 'table_name' => 'civicrm_action_schedule',
530 'entity' => 'ActionSchedule',
531 'bao' => 'CRM_Core_BAO_ActionSchedule',
532 'localizable' => 0,
533 ],
534 'end_date' => [
535 'name' => 'end_date',
536 'type' => CRM_Utils_Type::T_STRING,
537 'title' => ts('End Date'),
538 'description' => 'Entity end date',
539 'maxlength' => 64,
540 'size' => CRM_Utils_Type::BIG,
541 'table_name' => 'civicrm_action_schedule',
542 'entity' => 'ActionSchedule',
543 'bao' => 'CRM_Core_BAO_ActionSchedule',
544 'localizable' => 0,
545 ],
546 'is_active' => [
547 'name' => 'is_active',
548 'type' => CRM_Utils_Type::T_BOOLEAN,
549 'title' => ts('Schedule is Active?'),
550 'description' => 'Is this option active?',
551 'default' => '1',
552 'table_name' => 'civicrm_action_schedule',
553 'entity' => 'ActionSchedule',
554 'bao' => 'CRM_Core_BAO_ActionSchedule',
555 'localizable' => 0,
556 ],
557 'recipient_manual' => [
558 'name' => 'recipient_manual',
559 'type' => CRM_Utils_Type::T_STRING,
560 'title' => ts('Recipient Manual'),
561 'description' => 'Contact IDs to which reminder should be sent.',
562 'maxlength' => 128,
563 'size' => CRM_Utils_Type::HUGE,
564 'table_name' => 'civicrm_action_schedule',
565 'entity' => 'ActionSchedule',
566 'bao' => 'CRM_Core_BAO_ActionSchedule',
567 'localizable' => 0,
568 ],
569 'recipient_listing' => [
570 'name' => 'recipient_listing',
571 'type' => CRM_Utils_Type::T_STRING,
572 'title' => ts('Recipient Listing'),
573 'description' => 'listing based on recipient field.',
574 'maxlength' => 128,
575 'size' => CRM_Utils_Type::HUGE,
576 'table_name' => 'civicrm_action_schedule',
577 'entity' => 'ActionSchedule',
578 'bao' => 'CRM_Core_BAO_ActionSchedule',
579 'localizable' => 0,
580 ],
581 'body_text' => [
582 'name' => 'body_text',
583 'type' => CRM_Utils_Type::T_LONGTEXT,
584 'title' => ts('Reminder Text'),
585 'description' => 'Body of the mailing in text format.',
586 'table_name' => 'civicrm_action_schedule',
587 'entity' => 'ActionSchedule',
588 'bao' => 'CRM_Core_BAO_ActionSchedule',
589 'localizable' => 0,
590 ],
591 'body_html' => [
592 'name' => 'body_html',
593 'type' => CRM_Utils_Type::T_LONGTEXT,
594 'title' => ts('Reminder HTML'),
595 'description' => 'Body of the mailing in html format.',
596 'table_name' => 'civicrm_action_schedule',
597 'entity' => 'ActionSchedule',
598 'bao' => 'CRM_Core_BAO_ActionSchedule',
599 'localizable' => 0,
600 ],
601 'sms_body_text' => [
602 'name' => 'sms_body_text',
603 'type' => CRM_Utils_Type::T_LONGTEXT,
604 'title' => ts('SMS Reminder Text'),
605 'description' => 'Content of the SMS text.',
606 'table_name' => 'civicrm_action_schedule',
607 'entity' => 'ActionSchedule',
608 'bao' => 'CRM_Core_BAO_ActionSchedule',
609 'localizable' => 0,
610 ],
611 'subject' => [
612 'name' => 'subject',
613 'type' => CRM_Utils_Type::T_STRING,
614 'title' => ts('Reminder Subject'),
615 'description' => 'Subject of mailing',
616 'maxlength' => 128,
617 'size' => CRM_Utils_Type::HUGE,
618 'table_name' => 'civicrm_action_schedule',
619 'entity' => 'ActionSchedule',
620 'bao' => 'CRM_Core_BAO_ActionSchedule',
621 'localizable' => 0,
622 ],
623 'record_activity' => [
624 'name' => 'record_activity',
625 'type' => CRM_Utils_Type::T_BOOLEAN,
626 'title' => ts('Record Activity for Reminder?'),
627 'description' => 'Record Activity for this reminder?',
628 'default' => 'NULL',
629 'table_name' => 'civicrm_action_schedule',
630 'entity' => 'ActionSchedule',
631 'bao' => 'CRM_Core_BAO_ActionSchedule',
632 'localizable' => 0,
633 ],
634 'mapping_id' => [
635 'name' => 'mapping_id',
636 'type' => CRM_Utils_Type::T_STRING,
637 'title' => ts('Reminder Mapping'),
638 'description' => 'Name/ID of the mapping to use on this table',
639 'maxlength' => 64,
640 'size' => CRM_Utils_Type::BIG,
641 'table_name' => 'civicrm_action_schedule',
642 'entity' => 'ActionSchedule',
643 'bao' => 'CRM_Core_BAO_ActionSchedule',
644 'localizable' => 0,
645 ],
646 'group_id' => [
647 'name' => 'group_id',
648 'type' => CRM_Utils_Type::T_INT,
649 'title' => ts('Reminder Group'),
650 'description' => 'FK to Group',
651 'table_name' => 'civicrm_action_schedule',
652 'entity' => 'ActionSchedule',
653 'bao' => 'CRM_Core_BAO_ActionSchedule',
654 'localizable' => 0,
655 'FKClassName' => 'CRM_Contact_DAO_Group',
656 'html' => [
657 'type' => 'Select',
658 ],
659 'pseudoconstant' => [
660 'table' => 'civicrm_group',
661 'keyColumn' => 'id',
662 'labelColumn' => 'title',
663 ]
664 ],
665 'msg_template_id' => [
666 'name' => 'msg_template_id',
667 'type' => CRM_Utils_Type::T_INT,
668 'title' => ts('Reminder Template'),
669 'description' => 'FK to the message template.',
670 'table_name' => 'civicrm_action_schedule',
671 'entity' => 'ActionSchedule',
672 'bao' => 'CRM_Core_BAO_ActionSchedule',
673 'localizable' => 0,
674 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
675 ],
676 'sms_template_id' => [
677 'name' => 'sms_template_id',
678 'type' => CRM_Utils_Type::T_INT,
679 'title' => ts('SMS Reminder Template'),
680 'description' => 'FK to the message template.',
681 'table_name' => 'civicrm_action_schedule',
682 'entity' => 'ActionSchedule',
683 'bao' => 'CRM_Core_BAO_ActionSchedule',
684 'localizable' => 0,
685 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
686 ],
687 'absolute_date' => [
688 'name' => 'absolute_date',
689 'type' => CRM_Utils_Type::T_DATE,
690 'title' => ts('Fixed Date for Reminder'),
691 'description' => 'Date on which the reminder be sent.',
692 'table_name' => 'civicrm_action_schedule',
693 'entity' => 'ActionSchedule',
694 'bao' => 'CRM_Core_BAO_ActionSchedule',
695 'localizable' => 0,
696 ],
697 'from_name' => [
698 'name' => 'from_name',
699 'type' => CRM_Utils_Type::T_STRING,
700 'title' => ts('Reminder from Name'),
701 'description' => 'Name in "from" field',
702 'maxlength' => 255,
703 'size' => CRM_Utils_Type::HUGE,
704 'table_name' => 'civicrm_action_schedule',
705 'entity' => 'ActionSchedule',
706 'bao' => 'CRM_Core_BAO_ActionSchedule',
707 'localizable' => 0,
708 ],
709 'from_email' => [
710 'name' => 'from_email',
711 'type' => CRM_Utils_Type::T_STRING,
712 'title' => ts('Reminder From Email'),
713 'description' => 'Email address in "from" field',
714 'maxlength' => 255,
715 'size' => CRM_Utils_Type::HUGE,
716 'table_name' => 'civicrm_action_schedule',
717 'entity' => 'ActionSchedule',
718 'bao' => 'CRM_Core_BAO_ActionSchedule',
719 'localizable' => 0,
720 ],
721 'mode' => [
722 'name' => 'mode',
723 'type' => CRM_Utils_Type::T_STRING,
724 'title' => ts('Message Mode'),
725 'description' => 'Send the message as email or sms or both.',
726 'maxlength' => 128,
727 'size' => CRM_Utils_Type::HUGE,
728 'default' => 'Email',
729 'table_name' => 'civicrm_action_schedule',
730 'entity' => 'ActionSchedule',
731 'bao' => 'CRM_Core_BAO_ActionSchedule',
732 'localizable' => 0,
733 'html' => [
734 'type' => 'Select',
735 ],
736 'pseudoconstant' => [
737 'optionGroupName' => 'msg_mode',
738 'optionEditPath' => 'civicrm/admin/options/msg_mode',
739 ]
740 ],
741 'sms_provider_id' => [
742 'name' => 'sms_provider_id',
743 'type' => CRM_Utils_Type::T_INT,
744 'title' => ts('SMS Provider'),
745 'table_name' => 'civicrm_action_schedule',
746 'entity' => 'ActionSchedule',
747 'bao' => 'CRM_Core_BAO_ActionSchedule',
748 'localizable' => 0,
749 'FKClassName' => 'CRM_SMS_DAO_Provider',
750 'html' => [
751 'type' => 'Select',
752 ],
753 ],
754 'used_for' => [
755 'name' => 'used_for',
756 'type' => CRM_Utils_Type::T_STRING,
757 'title' => ts('Used For'),
758 'description' => 'Used for repeating entity',
759 'maxlength' => 64,
760 'size' => CRM_Utils_Type::BIG,
761 'table_name' => 'civicrm_action_schedule',
762 'entity' => 'ActionSchedule',
763 'bao' => 'CRM_Core_BAO_ActionSchedule',
764 'localizable' => 0,
765 ],
766 'filter_contact_language' => [
767 'name' => 'filter_contact_language',
768 'type' => CRM_Utils_Type::T_STRING,
769 'title' => ts('Filter Contact Language'),
770 'description' => 'Used for multilingual installation',
771 'maxlength' => 128,
772 'size' => CRM_Utils_Type::HUGE,
773 'table_name' => 'civicrm_action_schedule',
774 'entity' => 'ActionSchedule',
775 'bao' => 'CRM_Core_BAO_ActionSchedule',
776 'localizable' => 0,
777 ],
778 'communication_language' => [
779 'name' => 'communication_language',
780 'type' => CRM_Utils_Type::T_STRING,
781 'title' => ts('Communication Language'),
782 'description' => 'Used for multilingual installation',
783 'maxlength' => 8,
784 'size' => CRM_Utils_Type::EIGHT,
785 'table_name' => 'civicrm_action_schedule',
786 'entity' => 'ActionSchedule',
787 'bao' => 'CRM_Core_BAO_ActionSchedule',
788 'localizable' => 0,
789 ],
790 ];
791 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
792 }
793 return Civi::$statics[__CLASS__]['fields'];
794 }
795
796 /**
797 * Return a mapping from field-name to the corresponding key (as used in fields()).
798 *
799 * @return array
800 * Array(string $name => string $uniqueName).
801 */
802 public static function &fieldKeys() {
803 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
804 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
805 }
806 return Civi::$statics[__CLASS__]['fieldKeys'];
807 }
808
809 /**
810 * Returns the names of this table
811 *
812 * @return string
813 */
814 public static function getTableName() {
815 return self::$_tableName;
816 }
817
818 /**
819 * Returns if this table needs to be logged
820 *
821 * @return bool
822 */
823 public function getLog() {
824 return self::$_log;
825 }
826
827 /**
828 * Returns the list of fields that can be imported
829 *
830 * @param bool $prefix
831 *
832 * @return array
833 */
834 public static function &import($prefix = FALSE) {
835 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'action_schedule', $prefix, []);
836 return $r;
837 }
838
839 /**
840 * Returns the list of fields that can be exported
841 *
842 * @param bool $prefix
843 *
844 * @return array
845 */
846 public static function &export($prefix = FALSE) {
847 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'action_schedule', $prefix, []);
848 return $r;
849 }
850
851 /**
852 * Returns the list of indices
853 *
854 * @param bool $localize
855 *
856 * @return array
857 */
858 public static function indices($localize = TRUE) {
859 $indices = [];
860 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
861 }
862
863 }