DAOs with singular/plural options for entity titles
[civicrm-core.git] / CRM / Price / DAO / PriceFieldValue.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/Price/PriceFieldValue.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
7b66c3b5 9 * (GenCodeChecksum:16987d2cc463a2d9290339ad37070f16)
e501603b 10 */
c3fc2621 11
f41f0342 12/**
c3fc2621 13 * Database access object for the PriceFieldValue entity.
f41f0342 14 */
e501603b 15class CRM_Price_DAO_PriceFieldValue extends CRM_Core_DAO {
929a1c14
CW
16 const EXT = 'civicrm';
17 const TABLE_ADDED = '3.3';
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_price_field_value';
c3fc2621 25
e501603b 26 /**
f41f0342 27 * Should CiviCRM log any modifications to this table in the civicrm_log table.
e501603b 28 *
c3fc2621 29 * @var bool
e501603b 30 */
fa45b5b9 31 public static $_log = FALSE;
c3fc2621 32
e501603b
TO
33 /**
34 * Price Field Value
35 *
e6ca0a57 36 * @var int
e501603b
TO
37 */
38 public $id;
c3fc2621 39
e501603b
TO
40 /**
41 * FK to civicrm_price_field
42 *
e6ca0a57 43 * @var int
e501603b
TO
44 */
45 public $price_field_id;
c3fc2621 46
e501603b
TO
47 /**
48 * Price field option name
49 *
50 * @var string
51 */
52 public $name;
c3fc2621 53
e501603b
TO
54 /**
55 * Price field option label
56 *
57 * @var string
58 */
59 public $label;
c3fc2621 60
e501603b 61 /**
f95ab9d4 62 * Price field option description.
e501603b
TO
63 *
64 * @var text
65 */
66 public $description;
c3fc2621 67
e501603b
TO
68 /**
69 * Price field option pre help text.
70 *
71 * @var text
72 */
73 public $help_pre;
c3fc2621 74
e501603b
TO
75 /**
76 * Price field option post field help.
77 *
78 * @var text
79 */
80 public $help_post;
c3fc2621 81
e501603b
TO
82 /**
83 * Price field option amount
84 *
25e0f950 85 * @var float
e501603b
TO
86 */
87 public $amount;
c3fc2621 88
e501603b
TO
89 /**
90 * Number of participants per field option
91 *
e6ca0a57 92 * @var int
e501603b
TO
93 */
94 public $count;
c3fc2621 95
e501603b
TO
96 /**
97 * Max number of participants per field options
98 *
e6ca0a57 99 * @var int
e501603b
TO
100 */
101 public $max_value;
c3fc2621 102
e501603b
TO
103 /**
104 * Order in which the field options should appear
105 *
106 * @var int
107 */
108 public $weight;
c3fc2621 109
e501603b
TO
110 /**
111 * FK to Membership Type
112 *
e6ca0a57 113 * @var int
e501603b
TO
114 */
115 public $membership_type_id;
c3fc2621 116
e501603b
TO
117 /**
118 * Number of terms for this membership
119 *
e6ca0a57 120 * @var int
e501603b
TO
121 */
122 public $membership_num_terms;
c3fc2621 123
e501603b
TO
124 /**
125 * Is this default price field option
126 *
e6ca0a57 127 * @var bool
e501603b
TO
128 */
129 public $is_default;
c3fc2621 130
e501603b
TO
131 /**
132 * Is this price field value active
133 *
e6ca0a57 134 * @var bool
e501603b
TO
135 */
136 public $is_active;
c3fc2621 137
e501603b
TO
138 /**
139 * FK to Financial Type.
140 *
e6ca0a57 141 * @var int
e501603b
TO
142 */
143 public $financial_type_id;
c3fc2621 144
e501603b 145 /**
5afce5ad 146 * Portion of total amount which is NOT tax deductible.
e501603b
TO
147 *
148 * @var float
149 */
5afce5ad 150 public $non_deductible_amount;
c3fc2621 151
2db35bf6 152 /**
64ca7bcd 153 * Implicit FK to civicrm_option_group with name = 'visibility'
2db35bf6 154 *
e6ca0a57 155 * @var int
2db35bf6
AF
156 */
157 public $visibility_id;
c3fc2621 158
e501603b 159 /**
f41f0342 160 * Class constructor.
e501603b 161 */
c3fc2621 162 public function __construct() {
e501603b
TO
163 $this->__table = 'civicrm_price_field_value';
164 parent::__construct();
165 }
c3fc2621 166
449c4e6b
CW
167 /**
168 * Returns localized title of this entity.
7b66c3b5
AH
169 *
170 * @param bool $plural
171 * Whether to return the plural version of the title.
449c4e6b 172 */
7b66c3b5
AH
173 public static function getEntityTitle($plural = FALSE) {
174 return $plural ? ts('Price Field Values') : ts('Price Field Value');
449c4e6b
CW
175 }
176
e501603b 177 /**
f41f0342 178 * Returns foreign keys and entity references.
e501603b
TO
179 *
180 * @return array
181 * [CRM_Core_Reference_Interface]
182 */
c3fc2621 183 public static function getReferenceColumns() {
346aaaba 184 if (!isset(Civi::$statics[__CLASS__]['links'])) {
fa45b5b9 185 Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
c3fc2621
CW
186 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'price_field_id', 'civicrm_price_field', 'id');
187 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'membership_type_id', 'civicrm_membership_type', 'id');
188 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'financial_type_id', 'civicrm_financial_type', 'id');
346aaaba 189 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
e501603b 190 }
346aaaba 191 return Civi::$statics[__CLASS__]['links'];
e501603b 192 }
c3fc2621 193
e501603b
TO
194 /**
195 * Returns all the column names of this table
196 *
197 * @return array
198 */
c3fc2621 199 public static function &fields() {
346aaaba 200 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
c3fc2621
CW
201 Civi::$statics[__CLASS__]['fields'] = [
202 'id' => [
e501603b
TO
203 'name' => 'id',
204 'type' => CRM_Utils_Type::T_INT,
c3fc2621 205 'title' => ts('Price Field Value ID'),
215b423e 206 'description' => ts('Price Field Value'),
c3fc2621 207 'required' => TRUE,
a36434b9 208 'where' => 'civicrm_price_field_value.id',
522a26c9 209 'table_name' => 'civicrm_price_field_value',
210 'entity' => 'PriceFieldValue',
211 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 212 'localizable' => 0,
a9d0587b 213 'add' => '3.3',
c3fc2621
CW
214 ],
215 'price_field_id' => [
e501603b
TO
216 'name' => 'price_field_id',
217 'type' => CRM_Utils_Type::T_INT,
c3fc2621 218 'title' => ts('Price Field'),
215b423e 219 'description' => ts('FK to civicrm_price_field'),
c3fc2621 220 'required' => TRUE,
a36434b9 221 'where' => 'civicrm_price_field_value.price_field_id',
522a26c9 222 'table_name' => 'civicrm_price_field_value',
223 'entity' => 'PriceFieldValue',
224 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 225 'localizable' => 0,
e501603b 226 'FKClassName' => 'CRM_Price_DAO_PriceField',
a9d0587b 227 'add' => '3.3',
c3fc2621
CW
228 ],
229 'name' => [
e501603b
TO
230 'name' => 'name',
231 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 232 'title' => ts('Name'),
215b423e 233 'description' => ts('Price field option name'),
e501603b
TO
234 'maxlength' => 255,
235 'size' => CRM_Utils_Type::HUGE,
a36434b9 236 'where' => 'civicrm_price_field_value.name',
7154c2c0 237 'default' => 'NULL',
522a26c9 238 'table_name' => 'civicrm_price_field_value',
239 'entity' => 'PriceFieldValue',
240 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 241 'localizable' => 0,
c3fc2621 242 'html' => [
e501603b 243 'type' => 'Text',
c3fc2621 244 ],
a9d0587b 245 'add' => '3.3',
c3fc2621
CW
246 ],
247 'label' => [
e501603b
TO
248 'name' => 'label',
249 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 250 'title' => ts('Label'),
215b423e 251 'description' => ts('Price field option label'),
e501603b
TO
252 'maxlength' => 255,
253 'size' => CRM_Utils_Type::HUGE,
a36434b9 254 'where' => 'civicrm_price_field_value.label',
7154c2c0 255 'default' => 'NULL',
522a26c9 256 'table_name' => 'civicrm_price_field_value',
257 'entity' => 'PriceFieldValue',
258 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 259 'localizable' => 1,
c3fc2621 260 'html' => [
e501603b 261 'type' => 'Text',
c3fc2621 262 ],
a9d0587b 263 'add' => '3.3',
c3fc2621
CW
264 ],
265 'description' => [
e501603b
TO
266 'name' => 'description',
267 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 268 'title' => ts('Description'),
f95ab9d4 269 'description' => ts('Price field option description.'),
e501603b
TO
270 'rows' => 2,
271 'cols' => 60,
a36434b9 272 'where' => 'civicrm_price_field_value.description',
e501603b 273 'default' => 'NULL',
522a26c9 274 'table_name' => 'civicrm_price_field_value',
275 'entity' => 'PriceFieldValue',
276 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 277 'localizable' => 1,
c3fc2621 278 'html' => [
e501603b 279 'type' => 'TextArea',
c3fc2621 280 ],
a9d0587b 281 'add' => '3.3',
c3fc2621
CW
282 ],
283 'help_pre' => [
e501603b
TO
284 'name' => 'help_pre',
285 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 286 'title' => ts('Help Pre'),
215b423e 287 'description' => ts('Price field option pre help text.'),
e501603b
TO
288 'rows' => 2,
289 'cols' => 60,
a36434b9 290 'where' => 'civicrm_price_field_value.help_pre',
e501603b 291 'default' => 'NULL',
522a26c9 292 'table_name' => 'civicrm_price_field_value',
293 'entity' => 'PriceFieldValue',
294 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 295 'localizable' => 1,
c3fc2621 296 'html' => [
e501603b 297 'type' => 'TextArea',
c3fc2621 298 ],
a9d0587b 299 'add' => '4.7',
c3fc2621
CW
300 ],
301 'help_post' => [
e501603b
TO
302 'name' => 'help_post',
303 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 304 'title' => ts('Help Post'),
215b423e 305 'description' => ts('Price field option post field help.'),
e501603b
TO
306 'rows' => 2,
307 'cols' => 60,
a36434b9 308 'where' => 'civicrm_price_field_value.help_post',
e501603b 309 'default' => 'NULL',
522a26c9 310 'table_name' => 'civicrm_price_field_value',
311 'entity' => 'PriceFieldValue',
312 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 313 'localizable' => 1,
c3fc2621 314 'html' => [
e501603b 315 'type' => 'TextArea',
c3fc2621 316 ],
a9d0587b 317 'add' => '4.7',
c3fc2621
CW
318 ],
319 'amount' => [
e501603b 320 'name' => 'amount',
25e0f950 321 'type' => CRM_Utils_Type::T_MONEY,
c3fc2621 322 'title' => ts('Amount'),
215b423e 323 'description' => ts('Price field option amount'),
c3fc2621
CW
324 'required' => TRUE,
325 'precision' => [
25e0f950 326 18,
fb607354 327 9,
c3fc2621 328 ],
a36434b9 329 'where' => 'civicrm_price_field_value.amount',
522a26c9 330 'table_name' => 'civicrm_price_field_value',
331 'entity' => 'PriceFieldValue',
332 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 333 'localizable' => 0,
c3fc2621 334 'html' => [
e501603b 335 'type' => 'Text',
c3fc2621 336 ],
a9d0587b 337 'add' => '3.3',
c3fc2621
CW
338 ],
339 'count' => [
e501603b
TO
340 'name' => 'count',
341 'type' => CRM_Utils_Type::T_INT,
c3fc2621 342 'title' => ts('Count'),
215b423e 343 'description' => ts('Number of participants per field option'),
a36434b9 344 'where' => 'civicrm_price_field_value.count',
e501603b 345 'default' => 'NULL',
522a26c9 346 'table_name' => 'civicrm_price_field_value',
347 'entity' => 'PriceFieldValue',
348 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 349 'localizable' => 0,
c3fc2621 350 'html' => [
e501603b 351 'type' => 'Text',
c3fc2621 352 ],
a9d0587b 353 'add' => '3.3',
c3fc2621
CW
354 ],
355 'max_value' => [
e501603b
TO
356 'name' => 'max_value',
357 'type' => CRM_Utils_Type::T_INT,
c3fc2621 358 'title' => ts('Max Value'),
215b423e 359 'description' => ts('Max number of participants per field options'),
a36434b9 360 'where' => 'civicrm_price_field_value.max_value',
e501603b 361 'default' => 'NULL',
522a26c9 362 'table_name' => 'civicrm_price_field_value',
363 'entity' => 'PriceFieldValue',
364 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 365 'localizable' => 0,
c3fc2621 366 'html' => [
e501603b 367 'type' => 'Text',
c3fc2621 368 ],
a9d0587b 369 'add' => '3.3',
c3fc2621
CW
370 ],
371 'weight' => [
e501603b
TO
372 'name' => 'weight',
373 'type' => CRM_Utils_Type::T_INT,
c3fc2621 374 'title' => ts('Order'),
215b423e 375 'description' => ts('Order in which the field options should appear'),
a36434b9 376 'where' => 'civicrm_price_field_value.weight',
e501603b 377 'default' => '1',
522a26c9 378 'table_name' => 'civicrm_price_field_value',
379 'entity' => 'PriceFieldValue',
380 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 381 'localizable' => 0,
c3fc2621 382 'html' => [
e501603b 383 'type' => 'Text',
c3fc2621 384 ],
a9d0587b 385 'add' => '3.3',
c3fc2621
CW
386 ],
387 'membership_type_id' => [
e501603b
TO
388 'name' => 'membership_type_id',
389 'type' => CRM_Utils_Type::T_INT,
c3fc2621 390 'title' => ts('Membership Type'),
215b423e 391 'description' => ts('FK to Membership Type'),
a36434b9 392 'where' => 'civicrm_price_field_value.membership_type_id',
e501603b 393 'default' => 'NULL',
522a26c9 394 'table_name' => 'civicrm_price_field_value',
395 'entity' => 'PriceFieldValue',
396 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 397 'localizable' => 0,
e501603b 398 'FKClassName' => 'CRM_Member_DAO_MembershipType',
c3fc2621 399 'html' => [
e501603b 400 'type' => 'Select',
c3fc2621 401 ],
a9d0587b 402 'add' => '3.4',
c3fc2621
CW
403 ],
404 'membership_num_terms' => [
e501603b
TO
405 'name' => 'membership_num_terms',
406 'type' => CRM_Utils_Type::T_INT,
c3fc2621 407 'title' => ts('Membership Num Terms'),
215b423e 408 'description' => ts('Number of terms for this membership'),
a36434b9 409 'where' => 'civicrm_price_field_value.membership_num_terms',
e501603b 410 'default' => 'NULL',
522a26c9 411 'table_name' => 'civicrm_price_field_value',
412 'entity' => 'PriceFieldValue',
413 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 414 'localizable' => 0,
c3fc2621 415 'html' => [
e501603b 416 'type' => 'Text',
c3fc2621 417 ],
a9d0587b 418 'add' => '4.3',
c3fc2621
CW
419 ],
420 'is_default' => [
e501603b
TO
421 'name' => 'is_default',
422 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 423 'title' => ts('Is Default Price Field Option?'),
215b423e 424 'description' => ts('Is this default price field option'),
a36434b9 425 'where' => 'civicrm_price_field_value.is_default',
45a83e42 426 'default' => '0',
522a26c9 427 'table_name' => 'civicrm_price_field_value',
428 'entity' => 'PriceFieldValue',
429 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 430 'localizable' => 0,
c3fc2621 431 'html' => [
e501603b 432 'type' => 'CheckBox',
c3fc2621 433 ],
a9d0587b 434 'add' => '3.3',
c3fc2621
CW
435 ],
436 'is_active' => [
e501603b
TO
437 'name' => 'is_active',
438 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 439 'title' => ts('Price Field Value is Active'),
215b423e 440 'description' => ts('Is this price field value active'),
a36434b9 441 'where' => 'civicrm_price_field_value.is_active',
e501603b 442 'default' => '1',
522a26c9 443 'table_name' => 'civicrm_price_field_value',
444 'entity' => 'PriceFieldValue',
445 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 446 'localizable' => 0,
a9d0587b 447 'add' => '3.3',
c3fc2621
CW
448 ],
449 'financial_type_id' => [
e501603b
TO
450 'name' => 'financial_type_id',
451 'type' => CRM_Utils_Type::T_INT,
c3fc2621 452 'title' => ts('Financial Type'),
215b423e 453 'description' => ts('FK to Financial Type.'),
a36434b9 454 'where' => 'civicrm_price_field_value.financial_type_id',
e501603b 455 'default' => 'NULL',
522a26c9 456 'table_name' => 'civicrm_price_field_value',
457 'entity' => 'PriceFieldValue',
458 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 459 'localizable' => 0,
e501603b 460 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
c3fc2621 461 'html' => [
e501603b 462 'type' => 'Select',
c3fc2621
CW
463 ],
464 'pseudoconstant' => [
e501603b
TO
465 'table' => 'civicrm_financial_type',
466 'keyColumn' => 'id',
467 'labelColumn' => 'name',
e6ca0a57 468 ],
a9d0587b 469 'add' => '4.3',
c3fc2621
CW
470 ],
471 'non_deductible_amount' => [
5afce5ad 472 'name' => 'non_deductible_amount',
e501603b 473 'type' => CRM_Utils_Type::T_MONEY,
c3fc2621 474 'title' => ts('Non-deductible Amount'),
215b423e 475 'description' => ts('Portion of total amount which is NOT tax deductible.'),
c3fc2621
CW
476 'required' => TRUE,
477 'precision' => [
e501603b 478 20,
fb607354 479 2,
c3fc2621 480 ],
a36434b9 481 'where' => 'civicrm_price_field_value.non_deductible_amount',
482 'headerPattern' => '/non?.?deduct/i',
483 'dataPattern' => '/^\d+(\.\d{2})?$/',
e501603b 484 'default' => '0.0',
522a26c9 485 'table_name' => 'civicrm_price_field_value',
486 'entity' => 'PriceFieldValue',
487 'bao' => 'CRM_Price_BAO_PriceFieldValue',
6a7e5e5d 488 'localizable' => 0,
c3fc2621 489 'html' => [
e501603b 490 'type' => 'Text',
c3fc2621 491 ],
a9d0587b 492 'add' => '4.7',
c3fc2621
CW
493 ],
494 'visibility_id' => [
2db35bf6
AF
495 'name' => 'visibility_id',
496 'type' => CRM_Utils_Type::T_INT,
c3fc2621 497 'title' => ts('Price Field Option Visibility'),
215b423e 498 'description' => ts('Implicit FK to civicrm_option_group with name = \'visibility\''),
a36434b9 499 'where' => 'civicrm_price_field_value.visibility_id',
2db35bf6
AF
500 'default' => '1',
501 'table_name' => 'civicrm_price_field_value',
502 'entity' => 'PriceFieldValue',
503 'bao' => 'CRM_Price_BAO_PriceFieldValue',
504 'localizable' => 0,
c3fc2621 505 'html' => [
2db35bf6 506 'type' => 'Select',
c3fc2621
CW
507 ],
508 'pseudoconstant' => [
2db35bf6
AF
509 'optionGroupName' => 'visibility',
510 'optionEditPath' => 'civicrm/admin/options/visibility',
e6ca0a57 511 ],
a9d0587b 512 'add' => '4.7',
c3fc2621
CW
513 ],
514 ];
346aaaba 515 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 516 }
346aaaba 517 return Civi::$statics[__CLASS__]['fields'];
e501603b 518 }
c3fc2621 519
e501603b 520 /**
bd8e0b14 521 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
522 *
523 * @return array
bd8e0b14 524 * Array(string $name => string $uniqueName).
e501603b 525 */
c3fc2621 526 public static function &fieldKeys() {
bd8e0b14
TO
527 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
528 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 529 }
bd8e0b14 530 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b 531 }
c3fc2621 532
e501603b
TO
533 /**
534 * Returns the names of this table
535 *
536 * @return string
537 */
c3fc2621 538 public static function getTableName() {
e501603b
TO
539 return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
540 }
c3fc2621 541
e501603b
TO
542 /**
543 * Returns if this table needs to be logged
544 *
c3fc2621 545 * @return bool
e501603b 546 */
c3fc2621 547 public function getLog() {
e501603b
TO
548 return self::$_log;
549 }
c3fc2621 550
e501603b
TO
551 /**
552 * Returns the list of fields that can be imported
553 *
554 * @param bool $prefix
555 *
556 * @return array
557 */
c3fc2621
CW
558 public static function &import($prefix = FALSE) {
559 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'price_field_value', $prefix, []);
60808919 560 return $r;
e501603b 561 }
c3fc2621 562
e501603b
TO
563 /**
564 * Returns the list of fields that can be exported
565 *
566 * @param bool $prefix
567 *
568 * @return array
569 */
c3fc2621
CW
570 public static function &export($prefix = FALSE) {
571 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'price_field_value', $prefix, []);
60808919 572 return $r;
e501603b 573 }
c3fc2621 574
e7a6b91a
AS
575 /**
576 * Returns the list of indices
c3fc2621
CW
577 *
578 * @param bool $localize
579 *
580 * @return array
e7a6b91a
AS
581 */
582 public static function indices($localize = TRUE) {
c3fc2621 583 $indices = [];
e7a6b91a
AS
584 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
585 }
c3fc2621 586
e501603b 587}