Merge pull request #17993 from eileenmcnaughton/mm
[civicrm-core.git] / CRM / Campaign / DAO / Survey.php
CommitLineData
e501603b 1<?php
c3fc2621 2
e501603b
TO
3/**
4 * @package CRM
ca5cec67 5 * @copyright CiviCRM LLC https://civicrm.org/licensing
e501603b
TO
6 *
7 * Generated from xml/schema/CRM/Campaign/Survey.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
a9d0587b 9 * (GenCodeChecksum:80b92f90300f8e432ddd68e95d22b622)
e501603b 10 */
c3fc2621 11
f41f0342 12/**
c3fc2621 13 * Database access object for the Survey entity.
f41f0342 14 */
e501603b 15class CRM_Campaign_DAO_Survey extends CRM_Core_DAO {
c3fc2621 16
e501603b 17 /**
f41f0342 18 * Static instance to hold the table name.
e501603b
TO
19 *
20 * @var string
21 */
fa45b5b9 22 public static $_tableName = 'civicrm_survey';
c3fc2621 23
449c4e6b
CW
24 /**
25 * Icon associated with this entity.
26 *
27 * @var string
28 */
29 public static $_icon = 'fa-clipboard';
30
e501603b 31 /**
f41f0342 32 * Should CiviCRM log any modifications to this table in the civicrm_log table.
e501603b 33 *
c3fc2621 34 * @var bool
e501603b 35 */
fa45b5b9 36 public static $_log = FALSE;
c3fc2621 37
e501603b
TO
38 /**
39 * Survey id.
40 *
e6ca0a57 41 * @var int
e501603b
TO
42 */
43 public $id;
c3fc2621 44
e501603b
TO
45 /**
46 * Title of the Survey.
47 *
48 * @var string
49 */
50 public $title;
c3fc2621 51
e501603b
TO
52 /**
53 * Foreign key to the Campaign.
54 *
e6ca0a57 55 * @var int
e501603b
TO
56 */
57 public $campaign_id;
c3fc2621 58
e501603b
TO
59 /**
60 * Implicit FK to civicrm_option_value where option_group = activity_type
61 *
e6ca0a57 62 * @var int
e501603b
TO
63 */
64 public $activity_type_id;
c3fc2621 65
e501603b
TO
66 /**
67 * Recontact intervals for each status.
68 *
69 * @var text
70 */
71 public $recontact_interval;
c3fc2621 72
e501603b
TO
73 /**
74 * Script instructions for volunteers to use for the survey.
75 *
76 * @var text
77 */
78 public $instructions;
c3fc2621 79
e501603b
TO
80 /**
81 * Number of days for recurrence of release.
82 *
e6ca0a57 83 * @var int
e501603b
TO
84 */
85 public $release_frequency;
c3fc2621 86
e501603b
TO
87 /**
88 * Maximum number of contacts to allow for survey.
89 *
e6ca0a57 90 * @var int
e501603b
TO
91 */
92 public $max_number_of_contacts;
c3fc2621 93
e501603b
TO
94 /**
95 * Default number of contacts to allow for survey.
96 *
e6ca0a57 97 * @var int
e501603b
TO
98 */
99 public $default_number_of_contacts;
c3fc2621 100
e501603b
TO
101 /**
102 * Is this survey enabled or disabled/cancelled?
103 *
e6ca0a57 104 * @var bool
e501603b
TO
105 */
106 public $is_active;
c3fc2621 107
e501603b
TO
108 /**
109 * Is this default survey?
110 *
e6ca0a57 111 * @var bool
e501603b
TO
112 */
113 public $is_default;
c3fc2621 114
e501603b
TO
115 /**
116 * FK to civicrm_contact, who created this Survey.
117 *
e6ca0a57 118 * @var int
e501603b
TO
119 */
120 public $created_id;
c3fc2621 121
e501603b
TO
122 /**
123 * Date and time that Survey was created.
124 *
125 * @var datetime
126 */
127 public $created_date;
c3fc2621 128
e501603b
TO
129 /**
130 * FK to civicrm_contact, who recently edited this Survey.
131 *
e6ca0a57 132 * @var int
e501603b
TO
133 */
134 public $last_modified_id;
c3fc2621 135
e501603b
TO
136 /**
137 * Date and time that Survey was edited last time.
138 *
139 * @var datetime
140 */
141 public $last_modified_date;
c3fc2621 142
e501603b
TO
143 /**
144 * Used to store option group id.
145 *
e6ca0a57 146 * @var int
e501603b
TO
147 */
148 public $result_id;
c3fc2621 149
e501603b
TO
150 /**
151 * Bypass the email verification.
152 *
e6ca0a57 153 * @var bool
e501603b
TO
154 */
155 public $bypass_confirm;
c3fc2621 156
e501603b
TO
157 /**
158 * Title for Thank-you page (header title tag, and display at the top of the page).
159 *
160 * @var string
161 */
162 public $thankyou_title;
c3fc2621 163
e501603b
TO
164 /**
165 * text and html allowed. displayed above result on success page
166 *
167 * @var text
168 */
169 public $thankyou_text;
c3fc2621 170
e501603b
TO
171 /**
172 * Can people share the petition through social media?
173 *
e6ca0a57 174 * @var bool
e501603b
TO
175 */
176 public $is_share;
c3fc2621 177
e501603b 178 /**
f41f0342 179 * Class constructor.
e501603b 180 */
c3fc2621 181 public function __construct() {
e501603b
TO
182 $this->__table = 'civicrm_survey';
183 parent::__construct();
184 }
c3fc2621 185
449c4e6b
CW
186 /**
187 * Returns localized title of this entity.
188 */
189 public static function getEntityTitle() {
190 return ts('Surveys');
191 }
192
e501603b 193 /**
f41f0342 194 * Returns foreign keys and entity references.
e501603b
TO
195 *
196 * @return array
197 * [CRM_Core_Reference_Interface]
198 */
c3fc2621 199 public static function getReferenceColumns() {
346aaaba 200 if (!isset(Civi::$statics[__CLASS__]['links'])) {
fa45b5b9 201 Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
c3fc2621
CW
202 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
203 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'created_id', 'civicrm_contact', 'id');
204 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'last_modified_id', 'civicrm_contact', 'id');
346aaaba 205 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
e501603b 206 }
346aaaba 207 return Civi::$statics[__CLASS__]['links'];
e501603b 208 }
c3fc2621 209
e501603b
TO
210 /**
211 * Returns all the column names of this table
212 *
213 * @return array
214 */
c3fc2621 215 public static function &fields() {
346aaaba 216 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
c3fc2621
CW
217 Civi::$statics[__CLASS__]['fields'] = [
218 'id' => [
e501603b
TO
219 'name' => 'id',
220 'type' => CRM_Utils_Type::T_INT,
c3fc2621 221 'title' => ts('Survey ID'),
215b423e 222 'description' => ts('Survey id.'),
c3fc2621 223 'required' => TRUE,
a36434b9 224 'where' => 'civicrm_survey.id',
522a26c9 225 'table_name' => 'civicrm_survey',
226 'entity' => 'Survey',
227 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 228 'localizable' => 0,
a9d0587b 229 'add' => '3.3',
c3fc2621
CW
230 ],
231 'title' => [
e501603b
TO
232 'name' => 'title',
233 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 234 'title' => ts('Survey Title'),
215b423e 235 'description' => ts('Title of the Survey.'),
c3fc2621 236 'required' => TRUE,
e501603b
TO
237 'maxlength' => 255,
238 'size' => CRM_Utils_Type::HUGE,
c3fc2621 239 'import' => TRUE,
e501603b 240 'where' => 'civicrm_survey.title',
c3fc2621 241 'export' => TRUE,
522a26c9 242 'table_name' => 'civicrm_survey',
243 'entity' => 'Survey',
244 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 245 'localizable' => 1,
a9d0587b 246 'add' => '3.3',
c3fc2621
CW
247 ],
248 'campaign_id' => [
e501603b
TO
249 'name' => 'campaign_id',
250 'type' => CRM_Utils_Type::T_INT,
c3fc2621 251 'title' => ts('Survey Campaign ID'),
215b423e 252 'description' => ts('Foreign key to the Campaign.'),
a36434b9 253 'where' => 'civicrm_survey.campaign_id',
e501603b 254 'default' => 'NULL',
522a26c9 255 'table_name' => 'civicrm_survey',
256 'entity' => 'Survey',
257 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 258 'localizable' => 0,
e501603b 259 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
c3fc2621 260 'pseudoconstant' => [
e501603b
TO
261 'table' => 'civicrm_campaign',
262 'keyColumn' => 'id',
263 'labelColumn' => 'title',
e6ca0a57 264 ],
a9d0587b 265 'add' => '3.3',
c3fc2621
CW
266 ],
267 'activity_type_id' => [
e501603b
TO
268 'name' => 'activity_type_id',
269 'type' => CRM_Utils_Type::T_INT,
c3fc2621 270 'title' => ts('Activity Type'),
215b423e 271 'description' => ts('Implicit FK to civicrm_option_value where option_group = activity_type'),
c3fc2621 272 'import' => TRUE,
e501603b 273 'where' => 'civicrm_survey.activity_type_id',
c3fc2621 274 'export' => TRUE,
e501603b 275 'default' => 'NULL',
522a26c9 276 'table_name' => 'civicrm_survey',
277 'entity' => 'Survey',
278 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 279 'localizable' => 0,
c3fc2621 280 'html' => [
e501603b 281 'type' => 'Select',
c3fc2621
CW
282 ],
283 'pseudoconstant' => [
e501603b
TO
284 'optionGroupName' => 'activity_type',
285 'optionEditPath' => 'civicrm/admin/options/activity_type',
e6ca0a57 286 ],
a9d0587b 287 'add' => '3.3',
c3fc2621
CW
288 ],
289 'recontact_interval' => [
e501603b
TO
290 'name' => 'recontact_interval',
291 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 292 'title' => ts('Follow up Interval'),
215b423e 293 'description' => ts('Recontact intervals for each status.'),
e501603b
TO
294 'rows' => 20,
295 'cols' => 80,
a36434b9 296 'where' => 'civicrm_survey.recontact_interval',
522a26c9 297 'table_name' => 'civicrm_survey',
298 'entity' => 'Survey',
299 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 300 'localizable' => 0,
c3fc2621 301 'html' => [
e501603b 302 'type' => 'TextArea',
c3fc2621 303 ],
a9d0587b 304 'add' => '3.3',
c3fc2621
CW
305 ],
306 'instructions' => [
e501603b
TO
307 'name' => 'instructions',
308 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 309 'title' => ts('Instructions'),
215b423e 310 'description' => ts('Script instructions for volunteers to use for the survey.'),
e501603b
TO
311 'rows' => 20,
312 'cols' => 80,
a36434b9 313 'where' => 'civicrm_survey.instructions',
522a26c9 314 'table_name' => 'civicrm_survey',
315 'entity' => 'Survey',
316 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 317 'localizable' => 1,
c3fc2621 318 'html' => [
e501603b 319 'type' => 'TextArea',
c3fc2621 320 ],
a9d0587b 321 'add' => '3.3',
c3fc2621
CW
322 ],
323 'release_frequency' => [
e501603b
TO
324 'name' => 'release_frequency',
325 'type' => CRM_Utils_Type::T_INT,
c3fc2621 326 'title' => ts('Survey Hold Duration'),
215b423e 327 'description' => ts('Number of days for recurrence of release.'),
a36434b9 328 'where' => 'civicrm_survey.release_frequency',
e501603b 329 'default' => 'NULL',
522a26c9 330 'table_name' => 'civicrm_survey',
331 'entity' => 'Survey',
332 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 333 'localizable' => 0,
a9d0587b 334 'add' => '3.3',
c3fc2621
CW
335 ],
336 'max_number_of_contacts' => [
e501603b
TO
337 'name' => 'max_number_of_contacts',
338 'type' => CRM_Utils_Type::T_INT,
c3fc2621 339 'title' => ts('Maximum number of contacts'),
215b423e 340 'description' => ts('Maximum number of contacts to allow for survey.'),
a36434b9 341 'where' => 'civicrm_survey.max_number_of_contacts',
e501603b 342 'default' => 'NULL',
522a26c9 343 'table_name' => 'civicrm_survey',
344 'entity' => 'Survey',
345 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 346 'localizable' => 0,
a9d0587b 347 'add' => '3.3',
c3fc2621
CW
348 ],
349 'default_number_of_contacts' => [
e501603b
TO
350 'name' => 'default_number_of_contacts',
351 'type' => CRM_Utils_Type::T_INT,
c3fc2621 352 'title' => ts('Default number of contacts'),
215b423e 353 'description' => ts('Default number of contacts to allow for survey.'),
a36434b9 354 'where' => 'civicrm_survey.default_number_of_contacts',
e501603b 355 'default' => 'NULL',
522a26c9 356 'table_name' => 'civicrm_survey',
357 'entity' => 'Survey',
358 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 359 'localizable' => 0,
a9d0587b 360 'add' => '3.3',
c3fc2621
CW
361 ],
362 'is_active' => [
e501603b
TO
363 'name' => 'is_active',
364 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 365 'title' => ts('Survey Is Active'),
215b423e 366 'description' => ts('Is this survey enabled or disabled/cancelled?'),
a36434b9 367 'where' => 'civicrm_survey.is_active',
e501603b 368 'default' => '1',
522a26c9 369 'table_name' => 'civicrm_survey',
370 'entity' => 'Survey',
371 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 372 'localizable' => 0,
a9d0587b 373 'add' => '3.3',
c3fc2621
CW
374 ],
375 'is_default' => [
e501603b
TO
376 'name' => 'is_default',
377 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 378 'title' => ts('Is Default Survey'),
215b423e 379 'description' => ts('Is this default survey?'),
a36434b9 380 'where' => 'civicrm_survey.is_default',
45a83e42 381 'default' => '0',
522a26c9 382 'table_name' => 'civicrm_survey',
383 'entity' => 'Survey',
384 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 385 'localizable' => 0,
a9d0587b 386 'add' => '3.3',
c3fc2621
CW
387 ],
388 'created_id' => [
e501603b
TO
389 'name' => 'created_id',
390 'type' => CRM_Utils_Type::T_INT,
c3fc2621 391 'title' => ts('Survey Created By'),
215b423e 392 'description' => ts('FK to civicrm_contact, who created this Survey.'),
a36434b9 393 'where' => 'civicrm_survey.created_id',
522a26c9 394 'table_name' => 'civicrm_survey',
395 'entity' => 'Survey',
396 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 397 'localizable' => 0,
e501603b 398 'FKClassName' => 'CRM_Contact_DAO_Contact',
a9d0587b 399 'add' => '3.3',
c3fc2621
CW
400 ],
401 'created_date' => [
e501603b
TO
402 'name' => 'created_date',
403 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
c3fc2621 404 'title' => ts('Campaign Created Date'),
215b423e 405 'description' => ts('Date and time that Survey was created.'),
a36434b9 406 'where' => 'civicrm_survey.created_date',
522a26c9 407 'table_name' => 'civicrm_survey',
408 'entity' => 'Survey',
409 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 410 'localizable' => 0,
a9d0587b 411 'add' => '3.3',
c3fc2621
CW
412 ],
413 'last_modified_id' => [
e501603b
TO
414 'name' => 'last_modified_id',
415 'type' => CRM_Utils_Type::T_INT,
c3fc2621 416 'title' => ts('Survey Modified'),
215b423e 417 'description' => ts('FK to civicrm_contact, who recently edited this Survey.'),
a36434b9 418 'where' => 'civicrm_survey.last_modified_id',
522a26c9 419 'table_name' => 'civicrm_survey',
420 'entity' => 'Survey',
421 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 422 'localizable' => 0,
e501603b 423 'FKClassName' => 'CRM_Contact_DAO_Contact',
a9d0587b 424 'add' => '3.3',
c3fc2621
CW
425 ],
426 'last_modified_date' => [
e501603b
TO
427 'name' => 'last_modified_date',
428 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
c3fc2621 429 'title' => ts('Survey Modified On'),
215b423e 430 'description' => ts('Date and time that Survey was edited last time.'),
a36434b9 431 'where' => 'civicrm_survey.last_modified_date',
522a26c9 432 'table_name' => 'civicrm_survey',
433 'entity' => 'Survey',
434 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 435 'localizable' => 0,
a9d0587b 436 'add' => '3.3',
c3fc2621
CW
437 ],
438 'result_id' => [
e501603b
TO
439 'name' => 'result_id',
440 'type' => CRM_Utils_Type::T_INT,
c3fc2621 441 'title' => ts('Survey Result'),
215b423e 442 'description' => ts('Used to store option group id.'),
a36434b9 443 'where' => 'civicrm_survey.result_id',
e501603b 444 'default' => 'NULL',
522a26c9 445 'table_name' => 'civicrm_survey',
446 'entity' => 'Survey',
447 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 448 'localizable' => 0,
a9d0587b 449 'add' => '3.3',
c3fc2621
CW
450 ],
451 'bypass_confirm' => [
e501603b
TO
452 'name' => 'bypass_confirm',
453 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 454 'title' => ts('No Email Verification'),
215b423e 455 'description' => ts('Bypass the email verification.'),
a36434b9 456 'where' => 'civicrm_survey.bypass_confirm',
45a83e42 457 'default' => '0',
522a26c9 458 'table_name' => 'civicrm_survey',
459 'entity' => 'Survey',
460 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 461 'localizable' => 0,
a9d0587b 462 'add' => '4.2',
c3fc2621
CW
463 ],
464 'thankyou_title' => [
e501603b
TO
465 'name' => 'thankyou_title',
466 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 467 'title' => ts('Thank-you Title'),
215b423e 468 'description' => ts('Title for Thank-you page (header title tag, and display at the top of the page).'),
e501603b
TO
469 'maxlength' => 255,
470 'size' => CRM_Utils_Type::HUGE,
a36434b9 471 'where' => 'civicrm_survey.thankyou_title',
522a26c9 472 'table_name' => 'civicrm_survey',
473 'entity' => 'Survey',
474 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 475 'localizable' => 1,
a9d0587b 476 'add' => '4.2',
c3fc2621
CW
477 ],
478 'thankyou_text' => [
e501603b
TO
479 'name' => 'thankyou_text',
480 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 481 'title' => ts('Thank-you Text'),
215b423e 482 'description' => ts('text and html allowed. displayed above result on success page'),
e501603b
TO
483 'rows' => 8,
484 'cols' => 60,
a36434b9 485 'where' => 'civicrm_survey.thankyou_text',
522a26c9 486 'table_name' => 'civicrm_survey',
487 'entity' => 'Survey',
488 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 489 'localizable' => 1,
c3fc2621 490 'html' => [
e501603b 491 'type' => 'TextArea',
c3fc2621 492 ],
a9d0587b 493 'add' => '4.2',
c3fc2621
CW
494 ],
495 'is_share' => [
e501603b
TO
496 'name' => 'is_share',
497 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 498 'title' => ts('Is shared through social media'),
215b423e 499 'description' => ts('Can people share the petition through social media?'),
a36434b9 500 'where' => 'civicrm_survey.is_share',
e501603b 501 'default' => '1',
522a26c9 502 'table_name' => 'civicrm_survey',
503 'entity' => 'Survey',
504 'bao' => 'CRM_Campaign_BAO_Survey',
6a7e5e5d 505 'localizable' => 0,
a9d0587b 506 'add' => '4.4',
c3fc2621
CW
507 ],
508 ];
346aaaba 509 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 510 }
346aaaba 511 return Civi::$statics[__CLASS__]['fields'];
e501603b 512 }
c3fc2621 513
e501603b 514 /**
bd8e0b14 515 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
516 *
517 * @return array
bd8e0b14 518 * Array(string $name => string $uniqueName).
e501603b 519 */
c3fc2621 520 public static function &fieldKeys() {
bd8e0b14
TO
521 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
522 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 523 }
bd8e0b14 524 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b 525 }
c3fc2621 526
e501603b
TO
527 /**
528 * Returns the names of this table
529 *
530 * @return string
531 */
c3fc2621 532 public static function getTableName() {
e501603b
TO
533 return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
534 }
c3fc2621 535
e501603b
TO
536 /**
537 * Returns if this table needs to be logged
538 *
c3fc2621 539 * @return bool
e501603b 540 */
c3fc2621 541 public function getLog() {
e501603b
TO
542 return self::$_log;
543 }
c3fc2621 544
e501603b
TO
545 /**
546 * Returns the list of fields that can be imported
547 *
548 * @param bool $prefix
549 *
550 * @return array
551 */
c3fc2621
CW
552 public static function &import($prefix = FALSE) {
553 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'survey', $prefix, []);
60808919 554 return $r;
e501603b 555 }
c3fc2621 556
e501603b
TO
557 /**
558 * Returns the list of fields that can be exported
559 *
560 * @param bool $prefix
561 *
562 * @return array
563 */
c3fc2621
CW
564 public static function &export($prefix = FALSE) {
565 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'survey', $prefix, []);
60808919 566 return $r;
e501603b 567 }
c3fc2621 568
e7a6b91a
AS
569 /**
570 * Returns the list of indices
c3fc2621
CW
571 *
572 * @param bool $localize
573 *
574 * @return array
e7a6b91a
AS
575 */
576 public static function indices($localize = TRUE) {
c3fc2621
CW
577 $indices = [
578 'UI_activity_type_id' => [
e7a6b91a 579 'name' => 'UI_activity_type_id',
c3fc2621 580 'field' => [
e7a6b91a 581 0 => 'activity_type_id',
c3fc2621
CW
582 ],
583 'localizable' => FALSE,
e7a6b91a 584 'sig' => 'civicrm_survey::0::activity_type_id',
c3fc2621
CW
585 ],
586 ];
e7a6b91a
AS
587 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
588 }
c3fc2621 589
e501603b 590}