Merge pull request #19525 from eileenmcnaughton/member_soft
[civicrm-core.git] / CRM / Core / DAO / Menu.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/Core/Menu.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
2cbbebe8 9 * (GenCodeChecksum:16ed0eaa3c97f84ff3f007f9f593bc15)
e501603b 10 */
c3fc2621 11
f41f0342 12/**
c3fc2621 13 * Database access object for the Menu entity.
f41f0342 14 */
e501603b 15class CRM_Core_DAO_Menu extends CRM_Core_DAO {
929a1c14
CW
16 const EXT = 'civicrm';
17 const TABLE_ADDED = '1.1';
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_menu';
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 33 /**
e6ca0a57 34 * @var int
e501603b
TO
35 */
36 public $id;
c3fc2621 37
e501603b
TO
38 /**
39 * Which Domain is this menu item for
40 *
e6ca0a57 41 * @var int
e501603b
TO
42 */
43 public $domain_id;
c3fc2621 44
e501603b
TO
45 /**
46 * Path Name
47 *
48 * @var string
49 */
50 public $path;
c3fc2621 51
e501603b
TO
52 /**
53 * Arguments to pass to the url
54 *
55 * @var text
56 */
57 public $path_arguments;
c3fc2621 58
e501603b 59 /**
e501603b
TO
60 * @var string
61 */
62 public $title;
c3fc2621 63
e501603b
TO
64 /**
65 * Function to call to check access permissions
66 *
67 * @var string
68 */
69 public $access_callback;
c3fc2621 70
e501603b
TO
71 /**
72 * Arguments to pass to access callback
73 *
74 * @var text
75 */
76 public $access_arguments;
c3fc2621 77
e501603b
TO
78 /**
79 * function to call for this url
80 *
81 * @var string
82 */
83 public $page_callback;
c3fc2621 84
e501603b
TO
85 /**
86 * Arguments to pass to page callback
87 *
88 * @var text
89 */
90 public $page_arguments;
c3fc2621 91
e501603b
TO
92 /**
93 * Breadcrumb for the path.
94 *
95 * @var text
96 */
97 public $breadcrumb;
c3fc2621 98
e501603b
TO
99 /**
100 * Url where a page should redirected to, if next url not known.
101 *
102 * @var string
103 */
104 public $return_url;
c3fc2621 105
e501603b
TO
106 /**
107 * Arguments to pass to return_url
108 *
109 * @var string
110 */
111 public $return_url_args;
c3fc2621 112
e501603b
TO
113 /**
114 * Component that this menu item belongs to
115 *
e6ca0a57 116 * @var int
e501603b
TO
117 */
118 public $component_id;
c3fc2621 119
e501603b
TO
120 /**
121 * Is this menu item active?
122 *
e6ca0a57 123 * @var bool
e501603b
TO
124 */
125 public $is_active;
c3fc2621 126
e501603b
TO
127 /**
128 * Is this menu accessible to the public?
129 *
e6ca0a57 130 * @var bool
e501603b
TO
131 */
132 public $is_public;
c3fc2621 133
e501603b
TO
134 /**
135 * Is this menu exposed to the navigation system?
136 *
e6ca0a57 137 * @var bool
e501603b
TO
138 */
139 public $is_exposed;
c3fc2621 140
e501603b
TO
141 /**
142 * Should this menu be exposed via SSL if enabled?
143 *
e6ca0a57 144 * @var bool
e501603b
TO
145 */
146 public $is_ssl;
c3fc2621 147
e501603b
TO
148 /**
149 * Ordering of the menu items in various blocks.
150 *
151 * @var int
152 */
153 public $weight;
c3fc2621 154
e501603b
TO
155 /**
156 * Drupal menu type.
157 *
158 * @var int
159 */
160 public $type;
c3fc2621 161
e501603b
TO
162 /**
163 * CiviCRM menu type.
164 *
165 * @var int
166 */
167 public $page_type;
c3fc2621 168
e501603b
TO
169 /**
170 * skip this url being exposed to breadcrumb
171 *
e6ca0a57 172 * @var bool
e501603b
TO
173 */
174 public $skipBreadcrumb;
c3fc2621 175
b44dc91e
TO
176 /**
177 * All other menu metadata not stored in other fields
178 *
179 * @var text
180 */
181 public $module_data;
c3fc2621 182
e501603b 183 /**
f41f0342 184 * Class constructor.
e501603b 185 */
c3fc2621 186 public function __construct() {
e501603b
TO
187 $this->__table = 'civicrm_menu';
188 parent::__construct();
189 }
c3fc2621 190
449c4e6b
CW
191 /**
192 * Returns localized title of this entity.
7b66c3b5
AH
193 *
194 * @param bool $plural
195 * Whether to return the plural version of the title.
449c4e6b 196 */
7b66c3b5
AH
197 public static function getEntityTitle($plural = FALSE) {
198 return $plural ? ts('Menus') : ts('Menu');
449c4e6b
CW
199 }
200
e501603b 201 /**
f41f0342 202 * Returns foreign keys and entity references.
e501603b
TO
203 *
204 * @return array
205 * [CRM_Core_Reference_Interface]
206 */
c3fc2621 207 public static function getReferenceColumns() {
346aaaba 208 if (!isset(Civi::$statics[__CLASS__]['links'])) {
fa45b5b9 209 Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
c3fc2621
CW
210 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'domain_id', 'civicrm_domain', 'id');
211 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'component_id', 'civicrm_component', 'id');
346aaaba 212 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
e501603b 213 }
346aaaba 214 return Civi::$statics[__CLASS__]['links'];
e501603b 215 }
c3fc2621 216
e501603b
TO
217 /**
218 * Returns all the column names of this table
219 *
220 * @return array
221 */
c3fc2621 222 public static function &fields() {
346aaaba 223 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
c3fc2621
CW
224 Civi::$statics[__CLASS__]['fields'] = [
225 'id' => [
e501603b
TO
226 'name' => 'id',
227 'type' => CRM_Utils_Type::T_INT,
c3fc2621
CW
228 'title' => ts('Menu ID'),
229 'required' => TRUE,
a36434b9 230 'where' => 'civicrm_menu.id',
522a26c9 231 'table_name' => 'civicrm_menu',
232 'entity' => 'Menu',
233 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 234 'localizable' => 0,
2cbbebe8
A
235 'html' => [
236 'type' => 'Number',
237 ],
a9d0587b 238 'add' => '2.1',
c3fc2621
CW
239 ],
240 'domain_id' => [
e501603b
TO
241 'name' => 'domain_id',
242 'type' => CRM_Utils_Type::T_INT,
2cbbebe8 243 'title' => ts('Domain ID'),
215b423e 244 'description' => ts('Which Domain is this menu item for'),
c3fc2621 245 'required' => TRUE,
a36434b9 246 'where' => 'civicrm_menu.domain_id',
522a26c9 247 'table_name' => 'civicrm_menu',
248 'entity' => 'Menu',
249 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 250 'localizable' => 0,
e501603b 251 'FKClassName' => 'CRM_Core_DAO_Domain',
2cbbebe8
A
252 'html' => [
253 'label' => ts("Domain"),
254 ],
c3fc2621 255 'pseudoconstant' => [
e501603b
TO
256 'table' => 'civicrm_domain',
257 'keyColumn' => 'id',
258 'labelColumn' => 'name',
e6ca0a57 259 ],
a9d0587b 260 'add' => '3.0',
c3fc2621
CW
261 ],
262 'path' => [
e501603b
TO
263 'name' => 'path',
264 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 265 'title' => ts('Path'),
215b423e 266 'description' => ts('Path Name'),
e501603b
TO
267 'maxlength' => 255,
268 'size' => CRM_Utils_Type::HUGE,
a36434b9 269 'where' => 'civicrm_menu.path',
522a26c9 270 'table_name' => 'civicrm_menu',
271 'entity' => 'Menu',
272 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 273 'localizable' => 0,
a9d0587b 274 'add' => '2.1',
c3fc2621
CW
275 ],
276 'path_arguments' => [
e501603b
TO
277 'name' => 'path_arguments',
278 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 279 'title' => ts('Arguments'),
215b423e 280 'description' => ts('Arguments to pass to the url'),
a36434b9 281 'where' => 'civicrm_menu.path_arguments',
522a26c9 282 'table_name' => 'civicrm_menu',
283 'entity' => 'Menu',
284 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 285 'localizable' => 0,
a9d0587b 286 'add' => '2.1',
c3fc2621
CW
287 ],
288 'title' => [
e501603b
TO
289 'name' => 'title',
290 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 291 'title' => ts('Menu Title'),
e501603b
TO
292 'maxlength' => 255,
293 'size' => CRM_Utils_Type::HUGE,
a36434b9 294 'where' => 'civicrm_menu.title',
522a26c9 295 'table_name' => 'civicrm_menu',
296 'entity' => 'Menu',
297 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 298 'localizable' => 0,
a9d0587b 299 'add' => '2.1',
c3fc2621
CW
300 ],
301 'access_callback' => [
e501603b
TO
302 'name' => 'access_callback',
303 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 304 'title' => ts('Access Callback'),
215b423e 305 'description' => ts('Function to call to check access permissions'),
e501603b
TO
306 'maxlength' => 255,
307 'size' => CRM_Utils_Type::HUGE,
a36434b9 308 'where' => 'civicrm_menu.access_callback',
522a26c9 309 'table_name' => 'civicrm_menu',
310 'entity' => 'Menu',
311 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 312 'localizable' => 0,
a9d0587b 313 'add' => '2.1',
c3fc2621
CW
314 ],
315 'access_arguments' => [
e501603b
TO
316 'name' => 'access_arguments',
317 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 318 'title' => ts('Access Arguments'),
215b423e 319 'description' => ts('Arguments to pass to access callback'),
a36434b9 320 'where' => 'civicrm_menu.access_arguments',
522a26c9 321 'table_name' => 'civicrm_menu',
322 'entity' => 'Menu',
323 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 324 'localizable' => 0,
a9d0587b 325 'add' => '2.1',
c3fc2621
CW
326 ],
327 'page_callback' => [
e501603b
TO
328 'name' => 'page_callback',
329 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 330 'title' => ts('Page Callback'),
215b423e 331 'description' => ts('function to call for this url'),
e501603b
TO
332 'maxlength' => 255,
333 'size' => CRM_Utils_Type::HUGE,
a36434b9 334 'where' => 'civicrm_menu.page_callback',
522a26c9 335 'table_name' => 'civicrm_menu',
336 'entity' => 'Menu',
337 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 338 'localizable' => 0,
a9d0587b 339 'add' => '2.1',
c3fc2621
CW
340 ],
341 'page_arguments' => [
e501603b
TO
342 'name' => 'page_arguments',
343 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 344 'title' => ts('Page Arguments'),
215b423e 345 'description' => ts('Arguments to pass to page callback'),
a36434b9 346 'where' => 'civicrm_menu.page_arguments',
522a26c9 347 'table_name' => 'civicrm_menu',
348 'entity' => 'Menu',
349 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 350 'localizable' => 0,
a9d0587b 351 'add' => '2.1',
c3fc2621
CW
352 ],
353 'breadcrumb' => [
e501603b
TO
354 'name' => 'breadcrumb',
355 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 356 'title' => ts('Breadcrumb'),
215b423e 357 'description' => ts('Breadcrumb for the path.'),
a36434b9 358 'where' => 'civicrm_menu.breadcrumb',
522a26c9 359 'table_name' => 'civicrm_menu',
360 'entity' => 'Menu',
361 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 362 'localizable' => 0,
a9d0587b 363 'add' => '2.1',
c3fc2621
CW
364 ],
365 'return_url' => [
e501603b
TO
366 'name' => 'return_url',
367 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 368 'title' => ts('Return Url'),
215b423e 369 'description' => ts('Url where a page should redirected to, if next url not known.'),
e501603b
TO
370 'maxlength' => 255,
371 'size' => CRM_Utils_Type::HUGE,
a36434b9 372 'where' => 'civicrm_menu.return_url',
522a26c9 373 'table_name' => 'civicrm_menu',
374 'entity' => 'Menu',
375 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 376 'localizable' => 0,
a9d0587b 377 'add' => '2.1',
c3fc2621
CW
378 ],
379 'return_url_args' => [
e501603b
TO
380 'name' => 'return_url_args',
381 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 382 'title' => ts('Return Url Args'),
215b423e 383 'description' => ts('Arguments to pass to return_url'),
e501603b
TO
384 'maxlength' => 255,
385 'size' => CRM_Utils_Type::HUGE,
a36434b9 386 'where' => 'civicrm_menu.return_url_args',
522a26c9 387 'table_name' => 'civicrm_menu',
388 'entity' => 'Menu',
389 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 390 'localizable' => 0,
a9d0587b 391 'add' => '2.1',
c3fc2621
CW
392 ],
393 'component_id' => [
e501603b
TO
394 'name' => 'component_id',
395 'type' => CRM_Utils_Type::T_INT,
2cbbebe8 396 'title' => ts('Component ID'),
215b423e 397 'description' => ts('Component that this menu item belongs to'),
a36434b9 398 'where' => 'civicrm_menu.component_id',
522a26c9 399 'table_name' => 'civicrm_menu',
400 'entity' => 'Menu',
401 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 402 'localizable' => 0,
e501603b 403 'FKClassName' => 'CRM_Core_DAO_Component',
c3fc2621 404 'html' => [
e501603b 405 'type' => 'Select',
2cbbebe8 406 'label' => ts("Component"),
c3fc2621
CW
407 ],
408 'pseudoconstant' => [
e501603b
TO
409 'table' => 'civicrm_component',
410 'keyColumn' => 'id',
411 'labelColumn' => 'name',
e6ca0a57 412 ],
a9d0587b 413 'add' => '2.1',
c3fc2621
CW
414 ],
415 'is_active' => [
e501603b
TO
416 'name' => 'is_active',
417 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 418 'title' => ts('Enabled?'),
215b423e 419 'description' => ts('Is this menu item active?'),
a36434b9 420 'where' => 'civicrm_menu.is_active',
522a26c9 421 'table_name' => 'civicrm_menu',
422 'entity' => 'Menu',
423 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 424 'localizable' => 0,
a9d0587b 425 'add' => '2.1',
c3fc2621
CW
426 ],
427 'is_public' => [
e501603b
TO
428 'name' => 'is_public',
429 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 430 'title' => ts('Public?'),
215b423e 431 'description' => ts('Is this menu accessible to the public?'),
a36434b9 432 'where' => 'civicrm_menu.is_public',
522a26c9 433 'table_name' => 'civicrm_menu',
434 'entity' => 'Menu',
435 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 436 'localizable' => 0,
a9d0587b 437 'add' => '2.1',
c3fc2621
CW
438 ],
439 'is_exposed' => [
e501603b
TO
440 'name' => 'is_exposed',
441 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 442 'title' => ts('Exposed?'),
215b423e 443 'description' => ts('Is this menu exposed to the navigation system?'),
a36434b9 444 'where' => 'civicrm_menu.is_exposed',
522a26c9 445 'table_name' => 'civicrm_menu',
446 'entity' => 'Menu',
447 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 448 'localizable' => 0,
a9d0587b 449 'add' => '2.1',
c3fc2621
CW
450 ],
451 'is_ssl' => [
e501603b
TO
452 'name' => 'is_ssl',
453 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 454 'title' => ts('Use SSL?'),
215b423e 455 'description' => ts('Should this menu be exposed via SSL if enabled?'),
a36434b9 456 'where' => 'civicrm_menu.is_ssl',
522a26c9 457 'table_name' => 'civicrm_menu',
458 'entity' => 'Menu',
459 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 460 'localizable' => 0,
a9d0587b 461 'add' => '2.1',
c3fc2621
CW
462 ],
463 'weight' => [
e501603b
TO
464 'name' => 'weight',
465 'type' => CRM_Utils_Type::T_INT,
c3fc2621 466 'title' => ts('Order'),
215b423e 467 'description' => ts('Ordering of the menu items in various blocks.'),
c3fc2621 468 'required' => TRUE,
a36434b9 469 'where' => 'civicrm_menu.weight',
e501603b 470 'default' => '1',
522a26c9 471 'table_name' => 'civicrm_menu',
472 'entity' => 'Menu',
473 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 474 'localizable' => 0,
a9d0587b 475 'add' => '2.1',
c3fc2621
CW
476 ],
477 'type' => [
e501603b
TO
478 'name' => 'type',
479 'type' => CRM_Utils_Type::T_INT,
c3fc2621 480 'title' => ts('Type'),
215b423e 481 'description' => ts('Drupal menu type.'),
c3fc2621 482 'required' => TRUE,
a36434b9 483 'where' => 'civicrm_menu.type',
e501603b 484 'default' => '1',
522a26c9 485 'table_name' => 'civicrm_menu',
486 'entity' => 'Menu',
487 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 488 'localizable' => 0,
a9d0587b 489 'add' => '2.1',
c3fc2621
CW
490 ],
491 'page_type' => [
e501603b
TO
492 'name' => 'page_type',
493 'type' => CRM_Utils_Type::T_INT,
c3fc2621 494 'title' => ts('Page Type'),
215b423e 495 'description' => ts('CiviCRM menu type.'),
c3fc2621 496 'required' => TRUE,
a36434b9 497 'where' => 'civicrm_menu.page_type',
e501603b 498 'default' => '1',
522a26c9 499 'table_name' => 'civicrm_menu',
500 'entity' => 'Menu',
501 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 502 'localizable' => 0,
a9d0587b 503 'add' => '2.1',
c3fc2621
CW
504 ],
505 'skipBreadcrumb' => [
e501603b
TO
506 'name' => 'skipBreadcrumb',
507 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 508 'title' => ts('Hide Breadcrumb?'),
215b423e 509 'description' => ts('skip this url being exposed to breadcrumb'),
a36434b9 510 'where' => 'civicrm_menu.skipBreadcrumb',
522a26c9 511 'table_name' => 'civicrm_menu',
512 'entity' => 'Menu',
b44dc91e
TO
513 'bao' => 'CRM_Core_DAO_Menu',
514 'localizable' => 0,
a9d0587b 515 'add' => '2.2',
c3fc2621
CW
516 ],
517 'module_data' => [
b44dc91e
TO
518 'name' => 'module_data',
519 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 520 'title' => ts('Other menu data'),
215b423e 521 'description' => ts('All other menu metadata not stored in other fields'),
a36434b9 522 'where' => 'civicrm_menu.module_data',
b44dc91e
TO
523 'table_name' => 'civicrm_menu',
524 'entity' => 'Menu',
522a26c9 525 'bao' => 'CRM_Core_DAO_Menu',
6a7e5e5d 526 'localizable' => 0,
a9d0587b 527 'add' => '4.7',
c3fc2621
CW
528 ],
529 ];
346aaaba 530 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 531 }
346aaaba 532 return Civi::$statics[__CLASS__]['fields'];
e501603b 533 }
c3fc2621 534
e501603b 535 /**
bd8e0b14 536 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
537 *
538 * @return array
bd8e0b14 539 * Array(string $name => string $uniqueName).
e501603b 540 */
c3fc2621 541 public static function &fieldKeys() {
bd8e0b14
TO
542 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
543 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 544 }
bd8e0b14 545 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b 546 }
c3fc2621 547
e501603b
TO
548 /**
549 * Returns the names of this table
550 *
551 * @return string
552 */
c3fc2621 553 public static function getTableName() {
e501603b
TO
554 return self::$_tableName;
555 }
c3fc2621 556
e501603b
TO
557 /**
558 * Returns if this table needs to be logged
559 *
c3fc2621 560 * @return bool
e501603b 561 */
c3fc2621 562 public function getLog() {
e501603b
TO
563 return self::$_log;
564 }
c3fc2621 565
e501603b
TO
566 /**
567 * Returns the list of fields that can be imported
568 *
569 * @param bool $prefix
570 *
571 * @return array
572 */
c3fc2621
CW
573 public static function &import($prefix = FALSE) {
574 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'menu', $prefix, []);
60808919 575 return $r;
e501603b 576 }
c3fc2621 577
e501603b
TO
578 /**
579 * Returns the list of fields that can be exported
580 *
581 * @param bool $prefix
582 *
583 * @return array
584 */
c3fc2621
CW
585 public static function &export($prefix = FALSE) {
586 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'menu', $prefix, []);
60808919 587 return $r;
e501603b 588 }
c3fc2621 589
e7a6b91a
AS
590 /**
591 * Returns the list of indices
c3fc2621
CW
592 *
593 * @param bool $localize
594 *
595 * @return array
e7a6b91a
AS
596 */
597 public static function indices($localize = TRUE) {
c3fc2621
CW
598 $indices = [
599 'UI_path_domain_id' => [
e7a6b91a 600 'name' => 'UI_path_domain_id',
c3fc2621 601 'field' => [
e7a6b91a
AS
602 0 => 'path',
603 1 => 'domain_id',
c3fc2621
CW
604 ],
605 'localizable' => FALSE,
606 'unique' => TRUE,
e7a6b91a 607 'sig' => 'civicrm_menu::1::path::domain_id',
c3fc2621
CW
608 ],
609 ];
e7a6b91a
AS
610 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
611 }
c3fc2621 612
e501603b 613}