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