Merge pull request #18437 from colemanw/api4Perms
[civicrm-core.git] / CRM / Contact / DAO / Contact.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/Contact/Contact.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
a1d226d6 9 * (GenCodeChecksum:f58884560d4f49764182cd97f1bbbcdf)
e501603b 10 */
c3fc2621 11
f41f0342 12/**
c3fc2621 13 * Database access object for the Contact entity.
f41f0342 14 */
e501603b 15class CRM_Contact_DAO_Contact 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_contact';
c3fc2621 25
449c4e6b
CW
26 /**
27 * Icon associated with this entity.
28 *
29 * @var string
30 */
31 public static $_icon = 'fa-address-book-o';
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 = TRUE;
c3fc2621 39
e501603b
TO
40 /**
41 * Unique Contact ID
42 *
e6ca0a57 43 * @var int
e501603b
TO
44 */
45 public $id;
c3fc2621 46
e501603b
TO
47 /**
48 * Type of Contact.
49 *
50 * @var string
51 */
52 public $contact_type;
c3fc2621 53
e501603b
TO
54 /**
55 * May be used to over-ride contact view and edit templates.
56 *
57 * @var string
58 */
59 public $contact_sub_type;
c3fc2621 60
e501603b 61 /**
e6ca0a57 62 * @var bool
e501603b
TO
63 */
64 public $do_not_email;
c3fc2621 65
e501603b 66 /**
e6ca0a57 67 * @var bool
e501603b
TO
68 */
69 public $do_not_phone;
c3fc2621 70
e501603b 71 /**
e6ca0a57 72 * @var bool
e501603b
TO
73 */
74 public $do_not_mail;
c3fc2621 75
e501603b 76 /**
e6ca0a57 77 * @var bool
e501603b
TO
78 */
79 public $do_not_sms;
c3fc2621 80
e501603b 81 /**
e6ca0a57 82 * @var bool
e501603b
TO
83 */
84 public $do_not_trade;
c3fc2621 85
e501603b
TO
86 /**
87 * Has the contact opted out from receiving all bulk email from the organization or site domain?
88 *
e6ca0a57 89 * @var bool
e501603b
TO
90 */
91 public $is_opt_out;
c3fc2621 92
e501603b
TO
93 /**
94 * May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
95 *
96 * @var string
97 */
98 public $legal_identifier;
c3fc2621 99
e501603b
TO
100 /**
101 * Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.
102 *
103 * @var string
104 */
105 public $external_identifier;
c3fc2621 106
e501603b
TO
107 /**
108 * Name used for sorting different contact types
109 *
110 * @var string
111 */
112 public $sort_name;
c3fc2621 113
e501603b
TO
114 /**
115 * Formatted name representing preferred format for display/print/other output.
116 *
117 * @var string
118 */
119 public $display_name;
c3fc2621 120
e501603b
TO
121 /**
122 * Nickname.
123 *
124 * @var string
125 */
126 public $nick_name;
c3fc2621 127
e501603b
TO
128 /**
129 * Legal Name.
130 *
131 * @var string
132 */
133 public $legal_name;
c3fc2621 134
e501603b
TO
135 /**
136 * optional URL for preferred image (photo, logo, etc.) to display for this contact.
137 *
138 * @var text
139 */
140 public $image_URL;
c3fc2621 141
e501603b
TO
142 /**
143 * What is the preferred mode of communication.
144 *
145 * @var string
146 */
147 public $preferred_communication_method;
c3fc2621 148
e501603b
TO
149 /**
150 * Which language is preferred for communication. FK to languages in civicrm_option_value.
151 *
152 * @var string
153 */
154 public $preferred_language;
c3fc2621 155
e501603b
TO
156 /**
157 * What is the preferred mode of sending an email.
158 *
159 * @var string
160 */
161 public $preferred_mail_format;
c3fc2621 162
e501603b
TO
163 /**
164 * Key for validating requests related to this contact.
165 *
166 * @var string
167 */
168 public $hash;
c3fc2621 169
e501603b
TO
170 /**
171 * API Key for validating requests related to this contact.
172 *
173 * @var string
174 */
175 public $api_key;
c3fc2621 176
e501603b
TO
177 /**
178 * where contact come from, e.g. import, donate module insert...
179 *
180 * @var string
181 */
182 public $source;
c3fc2621 183
e501603b
TO
184 /**
185 * First Name.
186 *
187 * @var string
188 */
189 public $first_name;
c3fc2621 190
e501603b
TO
191 /**
192 * Middle Name.
193 *
194 * @var string
195 */
196 public $middle_name;
c3fc2621 197
e501603b
TO
198 /**
199 * Last Name.
200 *
201 * @var string
202 */
203 public $last_name;
c3fc2621 204
e501603b
TO
205 /**
206 * Prefix or Title for name (Ms, Mr...). FK to prefix ID
207 *
e6ca0a57 208 * @var int
e501603b
TO
209 */
210 public $prefix_id;
c3fc2621 211
e501603b
TO
212 /**
213 * Suffix for name (Jr, Sr...). FK to suffix ID
214 *
e6ca0a57 215 * @var int
e501603b
TO
216 */
217 public $suffix_id;
c3fc2621 218
e501603b
TO
219 /**
220 * Formal (academic or similar) title in front of name. (Prof., Dr. etc.)
221 *
222 * @var string
223 */
224 public $formal_title;
c3fc2621 225
e501603b
TO
226 /**
227 * Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.
228 *
e6ca0a57 229 * @var int
e501603b
TO
230 */
231 public $communication_style_id;
c3fc2621 232
e501603b
TO
233 /**
234 * FK to civicrm_option_value.id, that has to be valid registered Email Greeting.
235 *
e6ca0a57 236 * @var int
e501603b
TO
237 */
238 public $email_greeting_id;
c3fc2621 239
e501603b
TO
240 /**
241 * Custom Email Greeting.
242 *
243 * @var string
244 */
245 public $email_greeting_custom;
c3fc2621 246
e501603b
TO
247 /**
248 * Cache Email Greeting.
249 *
250 * @var string
251 */
252 public $email_greeting_display;
c3fc2621 253
e501603b
TO
254 /**
255 * FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.
256 *
e6ca0a57 257 * @var int
e501603b
TO
258 */
259 public $postal_greeting_id;
c3fc2621 260
e501603b
TO
261 /**
262 * Custom Postal greeting.
263 *
264 * @var string
265 */
266 public $postal_greeting_custom;
c3fc2621 267
e501603b
TO
268 /**
269 * Cache Postal greeting.
270 *
271 * @var string
272 */
273 public $postal_greeting_display;
c3fc2621 274
e501603b
TO
275 /**
276 * FK to civicrm_option_value.id, that has to be valid registered Addressee.
277 *
e6ca0a57 278 * @var int
e501603b
TO
279 */
280 public $addressee_id;
c3fc2621 281
e501603b
TO
282 /**
283 * Custom Addressee.
284 *
285 * @var string
286 */
287 public $addressee_custom;
c3fc2621 288
e501603b
TO
289 /**
290 * Cache Addressee.
291 *
292 * @var string
293 */
294 public $addressee_display;
c3fc2621 295
e501603b
TO
296 /**
297 * Job Title
298 *
299 * @var string
300 */
301 public $job_title;
c3fc2621 302
e501603b
TO
303 /**
304 * FK to gender ID
305 *
e6ca0a57 306 * @var int
e501603b
TO
307 */
308 public $gender_id;
c3fc2621 309
e501603b
TO
310 /**
311 * Date of birth
312 *
313 * @var date
314 */
315 public $birth_date;
c3fc2621 316
e501603b 317 /**
e6ca0a57 318 * @var bool
e501603b
TO
319 */
320 public $is_deceased;
c3fc2621 321
e501603b
TO
322 /**
323 * Date of deceased
324 *
325 * @var date
326 */
327 public $deceased_date;
c3fc2621 328
e501603b
TO
329 /**
330 * Household Name.
331 *
332 * @var string
333 */
334 public $household_name;
c3fc2621 335
e501603b
TO
336 /**
337 * Optional FK to Primary Contact for this household.
338 *
e6ca0a57 339 * @var int
e501603b
TO
340 */
341 public $primary_contact_id;
c3fc2621 342
e501603b
TO
343 /**
344 * Organization Name.
345 *
346 * @var string
347 */
348 public $organization_name;
c3fc2621 349
e501603b
TO
350 /**
351 * Standard Industry Classification Code.
352 *
353 * @var string
354 */
355 public $sic_code;
c3fc2621 356
e501603b
TO
357 /**
358 * the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM
359 *
360 * @var string
361 */
362 public $user_unique_id;
c3fc2621 363
e501603b
TO
364 /**
365 * OPTIONAL FK to civicrm_contact record.
366 *
e6ca0a57 367 * @var int
e501603b
TO
368 */
369 public $employer_id;
c3fc2621 370
e501603b 371 /**
e6ca0a57 372 * @var bool
e501603b
TO
373 */
374 public $is_deleted;
c3fc2621 375
e501603b
TO
376 /**
377 * When was the contact was created.
378 *
379 * @var timestamp
380 */
381 public $created_date;
c3fc2621 382
e501603b
TO
383 /**
384 * When was the contact (or closely related entity) was created or modified or deleted.
385 *
386 * @var timestamp
387 */
388 public $modified_date;
c3fc2621 389
e501603b 390 /**
f41f0342 391 * Class constructor.
e501603b 392 */
c3fc2621 393 public function __construct() {
e501603b
TO
394 $this->__table = 'civicrm_contact';
395 parent::__construct();
396 }
c3fc2621 397
449c4e6b
CW
398 /**
399 * Returns localized title of this entity.
400 */
401 public static function getEntityTitle() {
402 return ts('Contacts');
403 }
404
e501603b 405 /**
f41f0342 406 * Returns foreign keys and entity references.
e501603b
TO
407 *
408 * @return array
409 * [CRM_Core_Reference_Interface]
410 */
c3fc2621 411 public static function getReferenceColumns() {
346aaaba 412 if (!isset(Civi::$statics[__CLASS__]['links'])) {
fa45b5b9 413 Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
c3fc2621
CW
414 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'primary_contact_id', 'civicrm_contact', 'id');
415 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'employer_id', 'civicrm_contact', 'id');
346aaaba 416 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
e501603b 417 }
346aaaba 418 return Civi::$statics[__CLASS__]['links'];
e501603b 419 }
c3fc2621 420
e501603b
TO
421 /**
422 * Returns all the column names of this table
423 *
424 * @return array
425 */
c3fc2621 426 public static function &fields() {
346aaaba 427 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
c3fc2621
CW
428 Civi::$statics[__CLASS__]['fields'] = [
429 'id' => [
e501603b
TO
430 'name' => 'id',
431 'type' => CRM_Utils_Type::T_INT,
c3fc2621 432 'title' => ts('Contact ID'),
215b423e 433 'description' => ts('Unique Contact ID'),
c3fc2621
CW
434 'required' => TRUE,
435 'import' => TRUE,
e501603b
TO
436 'where' => 'civicrm_contact.id',
437 'headerPattern' => '/internal|contact?|id$/i',
c3fc2621 438 'export' => TRUE,
522a26c9 439 'table_name' => 'civicrm_contact',
440 'entity' => 'Contact',
441 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 442 'localizable' => 0,
a9d0587b 443 'add' => '1.1',
c3fc2621
CW
444 ],
445 'contact_type' => [
e501603b
TO
446 'name' => 'contact_type',
447 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 448 'title' => ts('Contact Type'),
215b423e 449 'description' => ts('Type of Contact.'),
e501603b
TO
450 'maxlength' => 64,
451 'size' => CRM_Utils_Type::BIG,
e501603b 452 'where' => 'civicrm_contact.contact_type',
a36434b9 453 'export' => TRUE,
f5c0f096 454 'contactType' => NULL,
522a26c9 455 'table_name' => 'civicrm_contact',
456 'entity' => 'Contact',
457 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 458 'localizable' => 0,
c3fc2621 459 'html' => [
e501603b 460 'type' => 'Select',
c3fc2621
CW
461 ],
462 'pseudoconstant' => [
e501603b
TO
463 'table' => 'civicrm_contact_type',
464 'keyColumn' => 'name',
465 'labelColumn' => 'label',
466 'condition' => 'parent_id IS NULL',
e6ca0a57 467 ],
a9d0587b 468 'add' => '1.1',
c3fc2621
CW
469 ],
470 'contact_sub_type' => [
e501603b
TO
471 'name' => 'contact_sub_type',
472 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 473 'title' => ts('Contact Subtype'),
215b423e 474 'description' => ts('May be used to over-ride contact view and edit templates.'),
e501603b
TO
475 'maxlength' => 255,
476 'size' => CRM_Utils_Type::HUGE,
c3fc2621 477 'import' => TRUE,
e501603b
TO
478 'where' => 'civicrm_contact.contact_sub_type',
479 'headerPattern' => '/C(ontact )?(subtype|sub-type|sub type)/i',
c3fc2621 480 'export' => TRUE,
522a26c9 481 'table_name' => 'civicrm_contact',
482 'entity' => 'Contact',
483 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 484 'localizable' => 0,
2a5c9b4d 485 'serialize' => self::SERIALIZE_SEPARATOR_BOOKEND,
c3fc2621 486 'html' => [
e501603b 487 'type' => 'Select',
c3fc2621
CW
488 ],
489 'pseudoconstant' => [
e501603b
TO
490 'table' => 'civicrm_contact_type',
491 'keyColumn' => 'name',
492 'labelColumn' => 'label',
493 'condition' => 'parent_id IS NOT NULL',
e6ca0a57 494 ],
a9d0587b 495 'add' => '1.5',
c3fc2621
CW
496 ],
497 'do_not_email' => [
e501603b
TO
498 'name' => 'do_not_email',
499 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621
CW
500 'title' => ts('Do Not Email'),
501 'import' => TRUE,
e501603b
TO
502 'where' => 'civicrm_contact.do_not_email',
503 'headerPattern' => '/d(o )?(not )?(email)/i',
504 'dataPattern' => '/^\d{1,}$/',
c3fc2621 505 'export' => TRUE,
45a83e42 506 'default' => '0',
522a26c9 507 'table_name' => 'civicrm_contact',
508 'entity' => 'Contact',
509 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 510 'localizable' => 0,
c3fc2621 511 'html' => [
e501603b 512 'type' => 'CheckBox',
c3fc2621 513 ],
a9d0587b 514 'add' => '1.1',
c3fc2621
CW
515 ],
516 'do_not_phone' => [
e501603b
TO
517 'name' => 'do_not_phone',
518 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621
CW
519 'title' => ts('Do Not Phone'),
520 'import' => TRUE,
e501603b
TO
521 'where' => 'civicrm_contact.do_not_phone',
522 'headerPattern' => '/d(o )?(not )?(call|phone)/i',
523 'dataPattern' => '/^\d{1,}$/',
c3fc2621 524 'export' => TRUE,
45a83e42 525 'default' => '0',
522a26c9 526 'table_name' => 'civicrm_contact',
527 'entity' => 'Contact',
528 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 529 'localizable' => 0,
c3fc2621 530 'html' => [
e501603b 531 'type' => 'CheckBox',
c3fc2621 532 ],
a9d0587b 533 'add' => '1.1',
c3fc2621
CW
534 ],
535 'do_not_mail' => [
e501603b
TO
536 'name' => 'do_not_mail',
537 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621
CW
538 'title' => ts('Do Not Mail'),
539 'import' => TRUE,
e501603b
TO
540 'where' => 'civicrm_contact.do_not_mail',
541 'headerPattern' => '/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i',
542 'dataPattern' => '/^\d{1,}$/',
c3fc2621 543 'export' => TRUE,
45a83e42 544 'default' => '0',
522a26c9 545 'table_name' => 'civicrm_contact',
546 'entity' => 'Contact',
547 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 548 'localizable' => 0,
c3fc2621 549 'html' => [
e501603b 550 'type' => 'CheckBox',
c3fc2621 551 ],
a9d0587b 552 'add' => '1.1',
c3fc2621
CW
553 ],
554 'do_not_sms' => [
e501603b
TO
555 'name' => 'do_not_sms',
556 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621
CW
557 'title' => ts('Do Not Sms'),
558 'import' => TRUE,
e501603b
TO
559 'where' => 'civicrm_contact.do_not_sms',
560 'headerPattern' => '/d(o )?(not )?(sms)/i',
561 'dataPattern' => '/^\d{1,}$/',
c3fc2621 562 'export' => TRUE,
45a83e42 563 'default' => '0',
522a26c9 564 'table_name' => 'civicrm_contact',
565 'entity' => 'Contact',
566 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 567 'localizable' => 0,
c3fc2621 568 'html' => [
e501603b 569 'type' => 'CheckBox',
c3fc2621 570 ],
a9d0587b 571 'add' => '3.0',
c3fc2621
CW
572 ],
573 'do_not_trade' => [
e501603b
TO
574 'name' => 'do_not_trade',
575 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621
CW
576 'title' => ts('Do Not Trade'),
577 'import' => TRUE,
e501603b
TO
578 'where' => 'civicrm_contact.do_not_trade',
579 'headerPattern' => '/d(o )?(not )?(trade)/i',
580 'dataPattern' => '/^\d{1,}$/',
c3fc2621 581 'export' => TRUE,
45a83e42 582 'default' => '0',
522a26c9 583 'table_name' => 'civicrm_contact',
584 'entity' => 'Contact',
585 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 586 'localizable' => 0,
c3fc2621 587 'html' => [
e501603b 588 'type' => 'CheckBox',
c3fc2621 589 ],
a9d0587b 590 'add' => '1.1',
c3fc2621
CW
591 ],
592 'is_opt_out' => [
e501603b
TO
593 'name' => 'is_opt_out',
594 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 595 'title' => ts('No Bulk Emails (User Opt Out)'),
215b423e 596 'description' => ts('Has the contact opted out from receiving all bulk email from the organization or site domain?'),
c3fc2621
CW
597 'required' => TRUE,
598 'import' => TRUE,
e501603b 599 'where' => 'civicrm_contact.is_opt_out',
c3fc2621 600 'export' => TRUE,
45a83e42 601 'default' => '0',
522a26c9 602 'table_name' => 'civicrm_contact',
603 'entity' => 'Contact',
604 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 605 'localizable' => 0,
c3fc2621 606 'html' => [
e501603b 607 'type' => 'CheckBox',
c3fc2621 608 ],
a9d0587b 609 'add' => '1.1',
c3fc2621
CW
610 ],
611 'legal_identifier' => [
e501603b
TO
612 'name' => 'legal_identifier',
613 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 614 'title' => ts('Legal Identifier'),
fb607354 615 'description' => ts('May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.'),
e501603b
TO
616 'maxlength' => 32,
617 'size' => CRM_Utils_Type::MEDIUM,
c3fc2621 618 'import' => TRUE,
e501603b
TO
619 'where' => 'civicrm_contact.legal_identifier',
620 'headerPattern' => '/legal\s?id/i',
621 'dataPattern' => '/\w+?\d{5,}/',
c3fc2621 622 'export' => TRUE,
522a26c9 623 'table_name' => 'civicrm_contact',
624 'entity' => 'Contact',
625 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 626 'localizable' => 0,
c3fc2621 627 'html' => [
e501603b 628 'type' => 'Text',
c3fc2621 629 ],
a9d0587b 630 'add' => '1.1',
c3fc2621
CW
631 ],
632 'external_identifier' => [
e501603b
TO
633 'name' => 'external_identifier',
634 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 635 'title' => ts('External Identifier'),
215b423e 636 'description' => ts('Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.'),
e501603b
TO
637 'maxlength' => 64,
638 'size' => 8,
c3fc2621 639 'import' => TRUE,
e501603b
TO
640 'where' => 'civicrm_contact.external_identifier',
641 'headerPattern' => '/external\s?id/i',
642 'dataPattern' => '/^\d{11,}$/',
c3fc2621 643 'export' => TRUE,
522a26c9 644 'table_name' => 'civicrm_contact',
645 'entity' => 'Contact',
646 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 647 'localizable' => 0,
c3fc2621 648 'html' => [
e501603b 649 'type' => 'Text',
c3fc2621 650 ],
a9d0587b 651 'add' => '1.1',
c3fc2621
CW
652 ],
653 'sort_name' => [
e501603b
TO
654 'name' => 'sort_name',
655 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 656 'title' => ts('Sort Name'),
215b423e 657 'description' => ts('Name used for sorting different contact types'),
e501603b
TO
658 'maxlength' => 128,
659 'size' => 30,
e501603b 660 'where' => 'civicrm_contact.sort_name',
a36434b9 661 'export' => TRUE,
522a26c9 662 'table_name' => 'civicrm_contact',
663 'entity' => 'Contact',
664 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 665 'localizable' => 0,
c3fc2621 666 'html' => [
e501603b 667 'type' => 'Text',
c3fc2621 668 ],
a9d0587b 669 'add' => '1.1',
c3fc2621
CW
670 ],
671 'display_name' => [
e501603b
TO
672 'name' => 'display_name',
673 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 674 'title' => ts('Display Name'),
215b423e 675 'description' => ts('Formatted name representing preferred format for display/print/other output.'),
e501603b
TO
676 'maxlength' => 128,
677 'size' => 30,
e501603b 678 'where' => 'civicrm_contact.display_name',
a36434b9 679 'export' => TRUE,
522a26c9 680 'table_name' => 'civicrm_contact',
681 'entity' => 'Contact',
682 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 683 'localizable' => 0,
c3fc2621 684 'html' => [
e501603b 685 'type' => 'Text',
c3fc2621 686 ],
a9d0587b 687 'add' => '1.1',
c3fc2621
CW
688 ],
689 'nick_name' => [
e501603b
TO
690 'name' => 'nick_name',
691 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 692 'title' => ts('Nickname'),
215b423e 693 'description' => ts('Nickname.'),
e501603b
TO
694 'maxlength' => 128,
695 'size' => 30,
c3fc2621 696 'import' => TRUE,
e501603b
TO
697 'where' => 'civicrm_contact.nick_name',
698 'headerPattern' => '/n(ick\s)name|nick$/i',
699 'dataPattern' => '/^\w+$/',
c3fc2621 700 'export' => TRUE,
522a26c9 701 'table_name' => 'civicrm_contact',
702 'entity' => 'Contact',
703 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 704 'localizable' => 0,
c3fc2621 705 'html' => [
e501603b 706 'type' => 'Text',
c3fc2621 707 ],
a9d0587b 708 'add' => '1.1',
c3fc2621
CW
709 ],
710 'legal_name' => [
e501603b
TO
711 'name' => 'legal_name',
712 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 713 'title' => ts('Legal Name'),
215b423e 714 'description' => ts('Legal Name.'),
e501603b
TO
715 'maxlength' => 128,
716 'size' => 30,
c3fc2621 717 'import' => TRUE,
e501603b
TO
718 'where' => 'civicrm_contact.legal_name',
719 'headerPattern' => '/^legal|(l(egal\s)?name)$/i',
c3fc2621 720 'export' => TRUE,
b383d043 721 'contactType' => 'Organization',
522a26c9 722 'table_name' => 'civicrm_contact',
723 'entity' => 'Contact',
724 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 725 'localizable' => 0,
c3fc2621 726 'html' => [
e501603b 727 'type' => 'Text',
c3fc2621 728 ],
a9d0587b 729 'add' => '1.1',
c3fc2621
CW
730 ],
731 'image_URL' => [
e501603b
TO
732 'name' => 'image_URL',
733 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 734 'title' => ts('Image Url'),
215b423e 735 'description' => ts('optional URL for preferred image (photo, logo, etc.) to display for this contact.'),
c3fc2621 736 'import' => TRUE,
e501603b 737 'where' => 'civicrm_contact.image_URL',
c3fc2621 738 'export' => TRUE,
522a26c9 739 'table_name' => 'civicrm_contact',
740 'entity' => 'Contact',
741 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 742 'localizable' => 0,
c3fc2621 743 'html' => [
e501603b 744 'type' => 'File',
c3fc2621 745 ],
a9d0587b 746 'add' => '1.1',
c3fc2621
CW
747 ],
748 'preferred_communication_method' => [
e501603b
TO
749 'name' => 'preferred_communication_method',
750 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 751 'title' => ts('Preferred Communication Method'),
215b423e 752 'description' => ts('What is the preferred mode of communication.'),
e501603b
TO
753 'maxlength' => 255,
754 'size' => CRM_Utils_Type::HUGE,
c3fc2621 755 'import' => TRUE,
e501603b
TO
756 'where' => 'civicrm_contact.preferred_communication_method',
757 'headerPattern' => '/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i',
758 'dataPattern' => '/^\w+$/',
c3fc2621 759 'export' => TRUE,
522a26c9 760 'table_name' => 'civicrm_contact',
761 'entity' => 'Contact',
762 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 763 'localizable' => 0,
2a5c9b4d 764 'serialize' => self::SERIALIZE_SEPARATOR_BOOKEND,
c3fc2621 765 'html' => [
e501603b 766 'type' => 'Select',
c3fc2621
CW
767 ],
768 'pseudoconstant' => [
e501603b
TO
769 'optionGroupName' => 'preferred_communication_method',
770 'optionEditPath' => 'civicrm/admin/options/preferred_communication_method',
e6ca0a57 771 ],
a9d0587b 772 'add' => '1.1',
c3fc2621
CW
773 ],
774 'preferred_language' => [
e501603b
TO
775 'name' => 'preferred_language',
776 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 777 'title' => ts('Preferred Language'),
215b423e 778 'description' => ts('Which language is preferred for communication. FK to languages in civicrm_option_value.'),
e501603b
TO
779 'maxlength' => 5,
780 'size' => CRM_Utils_Type::SIX,
c3fc2621 781 'import' => TRUE,
e501603b
TO
782 'where' => 'civicrm_contact.preferred_language',
783 'headerPattern' => '/^lang/i',
c3fc2621 784 'export' => TRUE,
522a26c9 785 'table_name' => 'civicrm_contact',
786 'entity' => 'Contact',
787 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 788 'localizable' => 0,
c3fc2621 789 'html' => [
e501603b 790 'type' => 'Select',
c3fc2621
CW
791 ],
792 'pseudoconstant' => [
e501603b
TO
793 'optionGroupName' => 'languages',
794 'keyColumn' => 'name',
795 'optionEditPath' => 'civicrm/admin/options/languages',
e6ca0a57 796 ],
a9d0587b 797 'add' => '3.2',
c3fc2621
CW
798 ],
799 'preferred_mail_format' => [
e501603b
TO
800 'name' => 'preferred_mail_format',
801 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 802 'title' => ts('Preferred Mail Format'),
215b423e 803 'description' => ts('What is the preferred mode of sending an email.'),
e501603b
TO
804 'maxlength' => 8,
805 'size' => CRM_Utils_Type::EIGHT,
c3fc2621 806 'import' => TRUE,
e501603b
TO
807 'where' => 'civicrm_contact.preferred_mail_format',
808 'headerPattern' => '/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i',
c3fc2621 809 'export' => TRUE,
e501603b 810 'default' => 'Both',
522a26c9 811 'table_name' => 'civicrm_contact',
812 'entity' => 'Contact',
813 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 814 'localizable' => 0,
c3fc2621 815 'html' => [
e501603b 816 'type' => 'Select',
c3fc2621
CW
817 ],
818 'pseudoconstant' => [
e501603b 819 'callback' => 'CRM_Core_SelectValues::pmf',
e6ca0a57 820 ],
a9d0587b 821 'add' => '1.1',
c3fc2621
CW
822 ],
823 'hash' => [
e501603b
TO
824 'name' => 'hash',
825 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 826 'title' => ts('Contact Hash'),
215b423e 827 'description' => ts('Key for validating requests related to this contact.'),
e501603b
TO
828 'maxlength' => 32,
829 'size' => CRM_Utils_Type::MEDIUM,
e501603b 830 'where' => 'civicrm_contact.hash',
a36434b9 831 'export' => TRUE,
522a26c9 832 'table_name' => 'civicrm_contact',
833 'entity' => 'Contact',
834 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 835 'localizable' => 0,
a9d0587b 836 'add' => '1.1',
c3fc2621
CW
837 ],
838 'api_key' => [
e501603b
TO
839 'name' => 'api_key',
840 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 841 'title' => ts('Api Key'),
215b423e 842 'description' => ts('API Key for validating requests related to this contact.'),
e501603b
TO
843 'maxlength' => 32,
844 'size' => CRM_Utils_Type::MEDIUM,
a36434b9 845 'where' => 'civicrm_contact.api_key',
1713a0ec
CW
846 'permission' => [
847 [
848 'administer CiviCRM',
849 'edit api keys',
850 ],
851 ],
522a26c9 852 'table_name' => 'civicrm_contact',
853 'entity' => 'Contact',
854 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 855 'localizable' => 0,
a9d0587b 856 'add' => '2.2',
c3fc2621
CW
857 ],
858 'contact_source' => [
e501603b
TO
859 'name' => 'source',
860 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 861 'title' => ts('Contact Source'),
215b423e 862 'description' => ts('where contact come from, e.g. import, donate module insert...'),
e501603b
TO
863 'maxlength' => 255,
864 'size' => 30,
c3fc2621 865 'import' => TRUE,
e501603b
TO
866 'where' => 'civicrm_contact.source',
867 'headerPattern' => '/(C(ontact\s)?Source)$/i',
c3fc2621 868 'export' => TRUE,
522a26c9 869 'table_name' => 'civicrm_contact',
870 'entity' => 'Contact',
871 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 872 'localizable' => 0,
c3fc2621 873 'html' => [
e501603b 874 'type' => 'Text',
c3fc2621 875 ],
a9d0587b 876 'add' => '1.1',
c3fc2621
CW
877 ],
878 'first_name' => [
e501603b
TO
879 'name' => 'first_name',
880 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 881 'title' => ts('First Name'),
215b423e 882 'description' => ts('First Name.'),
e501603b
TO
883 'maxlength' => 64,
884 'size' => 30,
c3fc2621 885 'import' => TRUE,
e501603b
TO
886 'where' => 'civicrm_contact.first_name',
887 'headerPattern' => '/^first|(f(irst\s)?name)$/i',
888 'dataPattern' => '/^\w+$/',
c3fc2621 889 'export' => TRUE,
f5c0f096 890 'contactType' => 'Individual',
522a26c9 891 'table_name' => 'civicrm_contact',
892 'entity' => 'Contact',
893 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 894 'localizable' => 0,
c3fc2621 895 'html' => [
e501603b 896 'type' => 'Text',
c3fc2621 897 ],
a9d0587b 898 'add' => '1.1',
c3fc2621
CW
899 ],
900 'middle_name' => [
e501603b
TO
901 'name' => 'middle_name',
902 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 903 'title' => ts('Middle Name'),
215b423e 904 'description' => ts('Middle Name.'),
e501603b
TO
905 'maxlength' => 64,
906 'size' => 30,
c3fc2621 907 'import' => TRUE,
e501603b
TO
908 'where' => 'civicrm_contact.middle_name',
909 'headerPattern' => '/^middle|(m(iddle\s)?name)$/i',
910 'dataPattern' => '/^\w+$/',
c3fc2621 911 'export' => TRUE,
f5c0f096 912 'contactType' => 'Individual',
522a26c9 913 'table_name' => 'civicrm_contact',
914 'entity' => 'Contact',
915 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 916 'localizable' => 0,
c3fc2621 917 'html' => [
e501603b 918 'type' => 'Text',
c3fc2621 919 ],
a9d0587b 920 'add' => '1.1',
c3fc2621
CW
921 ],
922 'last_name' => [
e501603b
TO
923 'name' => 'last_name',
924 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 925 'title' => ts('Last Name'),
215b423e 926 'description' => ts('Last Name.'),
e501603b
TO
927 'maxlength' => 64,
928 'size' => 30,
c3fc2621 929 'import' => TRUE,
e501603b
TO
930 'where' => 'civicrm_contact.last_name',
931 'headerPattern' => '/^last|(l(ast\s)?name)$/i',
932 'dataPattern' => '/^\w+(\s\w+)?+$/',
c3fc2621 933 'export' => TRUE,
f5c0f096 934 'contactType' => 'Individual',
522a26c9 935 'table_name' => 'civicrm_contact',
936 'entity' => 'Contact',
937 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 938 'localizable' => 0,
c3fc2621 939 'html' => [
e501603b 940 'type' => 'Text',
c3fc2621 941 ],
a9d0587b 942 'add' => '1.1',
c3fc2621
CW
943 ],
944 'prefix_id' => [
e501603b
TO
945 'name' => 'prefix_id',
946 'type' => CRM_Utils_Type::T_INT,
c3fc2621 947 'title' => ts('Individual Prefix'),
215b423e 948 'description' => ts('Prefix or Title for name (Ms, Mr...). FK to prefix ID'),
c3fc2621 949 'import' => TRUE,
e501603b
TO
950 'where' => 'civicrm_contact.prefix_id',
951 'headerPattern' => '/^(prefix|title)/i',
952 'dataPattern' => '/^(mr|ms|mrs|sir|dr)\.?$/i',
c3fc2621 953 'export' => TRUE,
f5c0f096 954 'contactType' => 'Individual',
522a26c9 955 'table_name' => 'civicrm_contact',
956 'entity' => 'Contact',
957 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 958 'localizable' => 0,
c3fc2621 959 'html' => [
e501603b 960 'type' => 'Select',
c3fc2621
CW
961 ],
962 'pseudoconstant' => [
e501603b
TO
963 'optionGroupName' => 'individual_prefix',
964 'optionEditPath' => 'civicrm/admin/options/individual_prefix',
e6ca0a57 965 ],
a9d0587b 966 'add' => '1.2',
c3fc2621
CW
967 ],
968 'suffix_id' => [
e501603b
TO
969 'name' => 'suffix_id',
970 'type' => CRM_Utils_Type::T_INT,
c3fc2621 971 'title' => ts('Individual Suffix'),
215b423e 972 'description' => ts('Suffix for name (Jr, Sr...). FK to suffix ID'),
c3fc2621 973 'import' => TRUE,
e501603b
TO
974 'where' => 'civicrm_contact.suffix_id',
975 'headerPattern' => '/^suffix$/i',
976 'dataPattern' => '/^(sr|jr)\.?|i{2,}$/',
c3fc2621 977 'export' => TRUE,
f5c0f096 978 'contactType' => 'Individual',
522a26c9 979 'table_name' => 'civicrm_contact',
980 'entity' => 'Contact',
981 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 982 'localizable' => 0,
c3fc2621 983 'html' => [
e501603b 984 'type' => 'Select',
c3fc2621
CW
985 ],
986 'pseudoconstant' => [
e501603b
TO
987 'optionGroupName' => 'individual_suffix',
988 'optionEditPath' => 'civicrm/admin/options/individual_suffix',
e6ca0a57 989 ],
a9d0587b 990 'add' => '1.2',
c3fc2621
CW
991 ],
992 'formal_title' => [
e501603b
TO
993 'name' => 'formal_title',
994 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 995 'title' => ts('Formal Title'),
215b423e 996 'description' => ts('Formal (academic or similar) title in front of name. (Prof., Dr. etc.)'),
e501603b
TO
997 'maxlength' => 64,
998 'size' => CRM_Utils_Type::BIG,
c3fc2621 999 'import' => TRUE,
e501603b
TO
1000 'where' => 'civicrm_contact.formal_title',
1001 'headerPattern' => '/^title/i',
c3fc2621 1002 'export' => TRUE,
f5c0f096 1003 'contactType' => 'Individual',
522a26c9 1004 'table_name' => 'civicrm_contact',
1005 'entity' => 'Contact',
1006 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1007 'localizable' => 0,
c3fc2621 1008 'html' => [
e501603b 1009 'type' => 'Text',
c3fc2621 1010 ],
a9d0587b 1011 'add' => '4.5',
c3fc2621
CW
1012 ],
1013 'communication_style_id' => [
e501603b
TO
1014 'name' => 'communication_style_id',
1015 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1016 'title' => ts('Communication Style'),
215b423e 1017 'description' => ts('Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.'),
1a18ea39 1018 'import' => TRUE,
e501603b 1019 'where' => 'civicrm_contact.communication_style_id',
1a18ea39 1020 'headerPattern' => '/style/i',
a36434b9 1021 'export' => TRUE,
522a26c9 1022 'table_name' => 'civicrm_contact',
1023 'entity' => 'Contact',
1024 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1025 'localizable' => 0,
c3fc2621 1026 'html' => [
e501603b 1027 'type' => 'Select',
c3fc2621
CW
1028 ],
1029 'pseudoconstant' => [
e501603b
TO
1030 'optionGroupName' => 'communication_style',
1031 'optionEditPath' => 'civicrm/admin/options/communication_style',
e6ca0a57 1032 ],
a9d0587b 1033 'add' => '4.4',
c3fc2621
CW
1034 ],
1035 'email_greeting_id' => [
e501603b
TO
1036 'name' => 'email_greeting_id',
1037 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1038 'title' => ts('Email Greeting ID'),
215b423e 1039 'description' => ts('FK to civicrm_option_value.id, that has to be valid registered Email Greeting.'),
54e389ac 1040 'where' => 'civicrm_contact.email_greeting_id',
a36434b9 1041 'export' => TRUE,
522a26c9 1042 'table_name' => 'civicrm_contact',
1043 'entity' => 'Contact',
1044 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1045 'localizable' => 0,
3542118f
CW
1046 'html' => [
1047 'type' => 'Select',
1048 ],
c3fc2621 1049 'pseudoconstant' => [
f4a9693e
SL
1050 'optionGroupName' => 'email_greeting',
1051 'optionEditPath' => 'civicrm/admin/options/email_greeting',
e6ca0a57 1052 ],
a9d0587b 1053 'add' => '3.0',
c3fc2621
CW
1054 ],
1055 'email_greeting_custom' => [
e501603b
TO
1056 'name' => 'email_greeting_custom',
1057 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1058 'title' => ts('Email Greeting Custom'),
215b423e 1059 'description' => ts('Custom Email Greeting.'),
e501603b
TO
1060 'maxlength' => 128,
1061 'size' => CRM_Utils_Type::HUGE,
c3fc2621 1062 'import' => TRUE,
e501603b 1063 'where' => 'civicrm_contact.email_greeting_custom',
c3fc2621 1064 'export' => FALSE,
522a26c9 1065 'table_name' => 'civicrm_contact',
1066 'entity' => 'Contact',
1067 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1068 'localizable' => 0,
c3fc2621 1069 'html' => [
e501603b 1070 'type' => 'Text',
c3fc2621 1071 ],
a9d0587b 1072 'add' => '3.0',
c3fc2621
CW
1073 ],
1074 'email_greeting_display' => [
e501603b
TO
1075 'name' => 'email_greeting_display',
1076 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1077 'title' => ts('Email Greeting'),
215b423e 1078 'description' => ts('Cache Email Greeting.'),
e501603b
TO
1079 'maxlength' => 255,
1080 'size' => CRM_Utils_Type::HUGE,
a36434b9 1081 'where' => 'civicrm_contact.email_greeting_display',
522a26c9 1082 'table_name' => 'civicrm_contact',
1083 'entity' => 'Contact',
1084 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1085 'localizable' => 0,
a9d0587b 1086 'add' => '3.0',
c3fc2621
CW
1087 ],
1088 'postal_greeting_id' => [
e501603b
TO
1089 'name' => 'postal_greeting_id',
1090 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1091 'title' => ts('Postal Greeting ID'),
215b423e 1092 'description' => ts('FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.'),
54e389ac 1093 'where' => 'civicrm_contact.postal_greeting_id',
a36434b9 1094 'export' => TRUE,
522a26c9 1095 'table_name' => 'civicrm_contact',
1096 'entity' => 'Contact',
1097 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1098 'localizable' => 0,
c3fc2621 1099 'html' => [
3542118f 1100 'type' => 'Select',
c3fc2621
CW
1101 ],
1102 'pseudoconstant' => [
f4a9693e
SL
1103 'optionGroupName' => 'postal_greeting',
1104 'optionEditPath' => 'civicrm/admin/options/postal_greeting',
e6ca0a57 1105 ],
a9d0587b 1106 'add' => '3.0',
c3fc2621
CW
1107 ],
1108 'postal_greeting_custom' => [
e501603b
TO
1109 'name' => 'postal_greeting_custom',
1110 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1111 'title' => ts('Postal Greeting Custom'),
215b423e 1112 'description' => ts('Custom Postal greeting.'),
e501603b
TO
1113 'maxlength' => 128,
1114 'size' => CRM_Utils_Type::HUGE,
c3fc2621 1115 'import' => TRUE,
e501603b 1116 'where' => 'civicrm_contact.postal_greeting_custom',
c3fc2621 1117 'export' => FALSE,
522a26c9 1118 'table_name' => 'civicrm_contact',
1119 'entity' => 'Contact',
1120 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1121 'localizable' => 0,
c3fc2621 1122 'html' => [
e501603b 1123 'type' => 'Text',
c3fc2621 1124 ],
a9d0587b 1125 'add' => '3.0',
c3fc2621
CW
1126 ],
1127 'postal_greeting_display' => [
e501603b
TO
1128 'name' => 'postal_greeting_display',
1129 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1130 'title' => ts('Postal Greeting'),
215b423e 1131 'description' => ts('Cache Postal greeting.'),
e501603b
TO
1132 'maxlength' => 255,
1133 'size' => CRM_Utils_Type::HUGE,
a36434b9 1134 'where' => 'civicrm_contact.postal_greeting_display',
522a26c9 1135 'table_name' => 'civicrm_contact',
1136 'entity' => 'Contact',
1137 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1138 'localizable' => 0,
a9d0587b 1139 'add' => '3.0',
c3fc2621
CW
1140 ],
1141 'addressee_id' => [
e501603b
TO
1142 'name' => 'addressee_id',
1143 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1144 'title' => ts('Addressee ID'),
215b423e 1145 'description' => ts('FK to civicrm_option_value.id, that has to be valid registered Addressee.'),
54e389ac 1146 'where' => 'civicrm_contact.addressee_id',
a36434b9 1147 'export' => TRUE,
522a26c9 1148 'table_name' => 'civicrm_contact',
1149 'entity' => 'Contact',
1150 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1151 'localizable' => 0,
3542118f
CW
1152 'html' => [
1153 'type' => 'Select',
1154 ],
c3fc2621 1155 'pseudoconstant' => [
a28e9198 1156 'optionGroupName' => 'addressee',
1157 'optionEditPath' => 'civicrm/admin/options/addressee',
e6ca0a57 1158 ],
a9d0587b 1159 'add' => '3.0',
c3fc2621
CW
1160 ],
1161 'addressee_custom' => [
e501603b
TO
1162 'name' => 'addressee_custom',
1163 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1164 'title' => ts('Addressee Custom'),
215b423e 1165 'description' => ts('Custom Addressee.'),
e501603b
TO
1166 'maxlength' => 128,
1167 'size' => CRM_Utils_Type::HUGE,
c3fc2621 1168 'import' => TRUE,
e501603b 1169 'where' => 'civicrm_contact.addressee_custom',
c3fc2621 1170 'export' => FALSE,
522a26c9 1171 'table_name' => 'civicrm_contact',
1172 'entity' => 'Contact',
1173 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1174 'localizable' => 0,
c3fc2621 1175 'html' => [
e501603b 1176 'type' => 'Text',
c3fc2621 1177 ],
a9d0587b 1178 'add' => '3.0',
c3fc2621
CW
1179 ],
1180 'addressee_display' => [
e501603b
TO
1181 'name' => 'addressee_display',
1182 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1183 'title' => ts('Addressee'),
215b423e 1184 'description' => ts('Cache Addressee.'),
e501603b
TO
1185 'maxlength' => 255,
1186 'size' => CRM_Utils_Type::HUGE,
a36434b9 1187 'where' => 'civicrm_contact.addressee_display',
522a26c9 1188 'table_name' => 'civicrm_contact',
1189 'entity' => 'Contact',
1190 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1191 'localizable' => 0,
a9d0587b 1192 'add' => '3.0',
c3fc2621
CW
1193 ],
1194 'job_title' => [
e501603b
TO
1195 'name' => 'job_title',
1196 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1197 'title' => ts('Job Title'),
215b423e 1198 'description' => ts('Job Title'),
e501603b
TO
1199 'maxlength' => 255,
1200 'size' => 30,
c3fc2621 1201 'import' => TRUE,
e501603b
TO
1202 'where' => 'civicrm_contact.job_title',
1203 'headerPattern' => '/^job|(j(ob\s)?title)$/i',
1204 'dataPattern' => '//',
c3fc2621 1205 'export' => TRUE,
f5c0f096 1206 'contactType' => 'Individual',
522a26c9 1207 'table_name' => 'civicrm_contact',
1208 'entity' => 'Contact',
1209 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1210 'localizable' => 0,
c3fc2621 1211 'html' => [
e501603b 1212 'type' => 'Text',
c3fc2621 1213 ],
a9d0587b 1214 'add' => '1.1',
c3fc2621
CW
1215 ],
1216 'gender_id' => [
e501603b
TO
1217 'name' => 'gender_id',
1218 'type' => CRM_Utils_Type::T_INT,
9ac33d0f 1219 'title' => ts('Gender ID'),
215b423e 1220 'description' => ts('FK to gender ID'),
c3fc2621 1221 'import' => TRUE,
e501603b
TO
1222 'where' => 'civicrm_contact.gender_id',
1223 'headerPattern' => '/^gender$/i',
c3fc2621 1224 'export' => TRUE,
f5c0f096 1225 'contactType' => 'Individual',
522a26c9 1226 'table_name' => 'civicrm_contact',
1227 'entity' => 'Contact',
1228 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1229 'localizable' => 0,
c3fc2621 1230 'html' => [
e501603b 1231 'type' => 'Select',
9ac33d0f 1232 'label' => ts("Gender"),
c3fc2621
CW
1233 ],
1234 'pseudoconstant' => [
e501603b
TO
1235 'optionGroupName' => 'gender',
1236 'optionEditPath' => 'civicrm/admin/options/gender',
e6ca0a57 1237 ],
a9d0587b 1238 'add' => '1.2',
c3fc2621
CW
1239 ],
1240 'birth_date' => [
e501603b
TO
1241 'name' => 'birth_date',
1242 'type' => CRM_Utils_Type::T_DATE,
c3fc2621 1243 'title' => ts('Birth Date'),
215b423e 1244 'description' => ts('Date of birth'),
c3fc2621 1245 'import' => TRUE,
e501603b
TO
1246 'where' => 'civicrm_contact.birth_date',
1247 'headerPattern' => '/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i',
1248 'dataPattern' => '/\d{4}-?\d{2}-?\d{2}/',
c3fc2621 1249 'export' => TRUE,
f5c0f096 1250 'contactType' => 'Individual',
522a26c9 1251 'table_name' => 'civicrm_contact',
1252 'entity' => 'Contact',
1253 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1254 'localizable' => 0,
c3fc2621 1255 'html' => [
e501603b 1256 'type' => 'Select Date',
24317d89 1257 'formatType' => 'birth',
c3fc2621 1258 ],
a9d0587b 1259 'add' => '1.1',
c3fc2621
CW
1260 ],
1261 'is_deceased' => [
e501603b
TO
1262 'name' => 'is_deceased',
1263 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1264 'title' => ts('Deceased'),
2cd5d411 1265 'required' => TRUE,
c3fc2621 1266 'import' => TRUE,
e501603b
TO
1267 'where' => 'civicrm_contact.is_deceased',
1268 'headerPattern' => '/i(s\s)?d(eceased)$/i',
c3fc2621 1269 'export' => TRUE,
f5c0f096 1270 'contactType' => 'Individual',
45a83e42 1271 'default' => '0',
522a26c9 1272 'table_name' => 'civicrm_contact',
1273 'entity' => 'Contact',
1274 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1275 'localizable' => 0,
c3fc2621 1276 'html' => [
e501603b 1277 'type' => 'CheckBox',
c3fc2621 1278 ],
a9d0587b 1279 'add' => '1.1',
c3fc2621
CW
1280 ],
1281 'deceased_date' => [
e501603b
TO
1282 'name' => 'deceased_date',
1283 'type' => CRM_Utils_Type::T_DATE,
c3fc2621 1284 'title' => ts('Deceased Date'),
215b423e 1285 'description' => ts('Date of deceased'),
c3fc2621 1286 'import' => TRUE,
e501603b
TO
1287 'where' => 'civicrm_contact.deceased_date',
1288 'headerPattern' => '/^deceased|(d(eceased\s)?date)$/i',
c3fc2621 1289 'export' => TRUE,
f5c0f096 1290 'contactType' => 'Individual',
522a26c9 1291 'table_name' => 'civicrm_contact',
1292 'entity' => 'Contact',
1293 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1294 'localizable' => 0,
c3fc2621 1295 'html' => [
e501603b 1296 'type' => 'Select Date',
24317d89 1297 'formatType' => 'birth',
c3fc2621 1298 ],
a9d0587b 1299 'add' => '1.5',
c3fc2621
CW
1300 ],
1301 'household_name' => [
e501603b
TO
1302 'name' => 'household_name',
1303 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1304 'title' => ts('Household Name'),
215b423e 1305 'description' => ts('Household Name.'),
e501603b
TO
1306 'maxlength' => 128,
1307 'size' => 30,
c3fc2621 1308 'import' => TRUE,
e501603b
TO
1309 'where' => 'civicrm_contact.household_name',
1310 'headerPattern' => '/^household|(h(ousehold\s)?name)$/i',
1311 'dataPattern' => '/^\w+$/',
c3fc2621 1312 'export' => TRUE,
f5c0f096 1313 'contactType' => 'Household',
522a26c9 1314 'table_name' => 'civicrm_contact',
1315 'entity' => 'Contact',
1316 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1317 'localizable' => 0,
c3fc2621 1318 'html' => [
e501603b 1319 'type' => 'Text',
c3fc2621 1320 ],
a9d0587b 1321 'add' => '1.1',
c3fc2621
CW
1322 ],
1323 'primary_contact_id' => [
e501603b
TO
1324 'name' => 'primary_contact_id',
1325 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1326 'title' => ts('Household Primary Contact ID'),
215b423e 1327 'description' => ts('Optional FK to Primary Contact for this household.'),
a36434b9 1328 'where' => 'civicrm_contact.primary_contact_id',
f5c0f096 1329 'contactType' => 'Household',
522a26c9 1330 'table_name' => 'civicrm_contact',
1331 'entity' => 'Contact',
1332 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1333 'localizable' => 0,
e501603b 1334 'FKClassName' => 'CRM_Contact_DAO_Contact',
a9d0587b 1335 'add' => '1.1',
c3fc2621
CW
1336 ],
1337 'organization_name' => [
e501603b
TO
1338 'name' => 'organization_name',
1339 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1340 'title' => ts('Organization Name'),
215b423e 1341 'description' => ts('Organization Name.'),
e501603b
TO
1342 'maxlength' => 128,
1343 'size' => 30,
c3fc2621 1344 'import' => TRUE,
e501603b
TO
1345 'where' => 'civicrm_contact.organization_name',
1346 'headerPattern' => '/^organization|(o(rganization\s)?name)$/i',
1347 'dataPattern' => '/^\w+$/',
c3fc2621 1348 'export' => TRUE,
f5c0f096 1349 'contactType' => 'Organization',
522a26c9 1350 'table_name' => 'civicrm_contact',
1351 'entity' => 'Contact',
1352 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1353 'localizable' => 0,
c3fc2621 1354 'html' => [
e501603b 1355 'type' => 'Text',
c3fc2621 1356 ],
a9d0587b 1357 'add' => '1.1',
c3fc2621
CW
1358 ],
1359 'sic_code' => [
e501603b
TO
1360 'name' => 'sic_code',
1361 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1362 'title' => ts('Sic Code'),
215b423e 1363 'description' => ts('Standard Industry Classification Code.'),
e501603b
TO
1364 'maxlength' => 8,
1365 'size' => CRM_Utils_Type::EIGHT,
c3fc2621 1366 'import' => TRUE,
e501603b
TO
1367 'where' => 'civicrm_contact.sic_code',
1368 'headerPattern' => '/^sic|(s(ic\s)?code)$/i',
c3fc2621 1369 'export' => TRUE,
f5c0f096 1370 'contactType' => 'Organization',
522a26c9 1371 'table_name' => 'civicrm_contact',
1372 'entity' => 'Contact',
1373 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1374 'localizable' => 0,
c3fc2621 1375 'html' => [
e501603b 1376 'type' => 'Text',
c3fc2621 1377 ],
a9d0587b 1378 'add' => '1.1',
c3fc2621
CW
1379 ],
1380 'user_unique_id' => [
e501603b
TO
1381 'name' => 'user_unique_id',
1382 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 1383 'title' => ts('Unique ID (OpenID)'),
215b423e 1384 'description' => ts('the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM'),
e501603b
TO
1385 'maxlength' => 255,
1386 'size' => CRM_Utils_Type::HUGE,
c3fc2621 1387 'import' => TRUE,
e501603b
TO
1388 'where' => 'civicrm_contact.user_unique_id',
1389 'headerPattern' => '/^Open\s?ID|u(niq\w*)?\s?ID/i',
1390 'dataPattern' => '/^[\w\/\:\.]+$/',
c3fc2621 1391 'export' => TRUE,
e501603b 1392 'rule' => 'url',
522a26c9 1393 'table_name' => 'civicrm_contact',
1394 'entity' => 'Contact',
1395 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1396 'localizable' => 0,
c3fc2621 1397 'html' => [
e501603b 1398 'type' => 'Text',
c3fc2621 1399 ],
a9d0587b 1400 'add' => '2.0',
c3fc2621
CW
1401 ],
1402 'current_employer_id' => [
e501603b
TO
1403 'name' => 'employer_id',
1404 'type' => CRM_Utils_Type::T_INT,
a1d226d6 1405 'title' => ts('Current Employer ID'),
215b423e 1406 'description' => ts('OPTIONAL FK to civicrm_contact record.'),
e501603b 1407 'where' => 'civicrm_contact.employer_id',
a36434b9 1408 'export' => TRUE,
f5c0f096 1409 'contactType' => 'Individual',
522a26c9 1410 'table_name' => 'civicrm_contact',
1411 'entity' => 'Contact',
1412 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1413 'localizable' => 0,
e501603b 1414 'FKClassName' => 'CRM_Contact_DAO_Contact',
c3fc2621 1415 'html' => [
e501603b 1416 'type' => 'EntityRef',
a1d226d6 1417 'label' => ts("Current Employer"),
c3fc2621 1418 ],
a9d0587b 1419 'add' => '2.1',
c3fc2621
CW
1420 ],
1421 'contact_is_deleted' => [
e501603b
TO
1422 'name' => 'is_deleted',
1423 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621
CW
1424 'title' => ts('Contact is in Trash'),
1425 'required' => TRUE,
e501603b 1426 'where' => 'civicrm_contact.is_deleted',
a36434b9 1427 'export' => TRUE,
d2ff128c
CW
1428 'permission' => [
1429 'access deleted contacts',
1430 ],
45a83e42 1431 'default' => '0',
522a26c9 1432 'table_name' => 'civicrm_contact',
1433 'entity' => 'Contact',
1434 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1435 'localizable' => 0,
c3fc2621 1436 'html' => [
e501603b 1437 'type' => 'CheckBox',
c3fc2621 1438 ],
a9d0587b 1439 'add' => '3.2',
c3fc2621
CW
1440 ],
1441 'created_date' => [
e501603b
TO
1442 'name' => 'created_date',
1443 'type' => CRM_Utils_Type::T_TIMESTAMP,
c3fc2621 1444 'title' => ts('Created Date'),
215b423e 1445 'description' => ts('When was the contact was created.'),
c3fc2621 1446 'required' => FALSE,
e501603b 1447 'where' => 'civicrm_contact.created_date',
a36434b9 1448 'export' => TRUE,
e501603b 1449 'default' => 'NULL',
522a26c9 1450 'table_name' => 'civicrm_contact',
1451 'entity' => 'Contact',
1452 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1453 'localizable' => 0,
a9d0587b 1454 'add' => '4.3',
c3fc2621
CW
1455 ],
1456 'modified_date' => [
e501603b
TO
1457 'name' => 'modified_date',
1458 'type' => CRM_Utils_Type::T_TIMESTAMP,
c3fc2621 1459 'title' => ts('Modified Date'),
215b423e 1460 'description' => ts('When was the contact (or closely related entity) was created or modified or deleted.'),
c3fc2621 1461 'required' => FALSE,
e501603b 1462 'where' => 'civicrm_contact.modified_date',
a36434b9 1463 'export' => TRUE,
e501603b 1464 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
522a26c9 1465 'table_name' => 'civicrm_contact',
1466 'entity' => 'Contact',
1467 'bao' => 'CRM_Contact_BAO_Contact',
6a7e5e5d 1468 'localizable' => 0,
a9d0587b 1469 'add' => '4.3',
c3fc2621
CW
1470 ],
1471 ];
346aaaba 1472 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 1473 }
346aaaba 1474 return Civi::$statics[__CLASS__]['fields'];
e501603b 1475 }
c3fc2621 1476
e501603b 1477 /**
bd8e0b14 1478 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
1479 *
1480 * @return array
bd8e0b14 1481 * Array(string $name => string $uniqueName).
e501603b 1482 */
c3fc2621 1483 public static function &fieldKeys() {
bd8e0b14
TO
1484 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
1485 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 1486 }
bd8e0b14 1487 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b 1488 }
c3fc2621 1489
e501603b
TO
1490 /**
1491 * Returns the names of this table
1492 *
1493 * @return string
1494 */
c3fc2621 1495 public static function getTableName() {
e501603b
TO
1496 return self::$_tableName;
1497 }
c3fc2621 1498
e501603b
TO
1499 /**
1500 * Returns if this table needs to be logged
1501 *
c3fc2621 1502 * @return bool
e501603b 1503 */
c3fc2621 1504 public function getLog() {
e501603b
TO
1505 return self::$_log;
1506 }
c3fc2621 1507
e501603b
TO
1508 /**
1509 * Returns the list of fields that can be imported
1510 *
1511 * @param bool $prefix
1512 *
1513 * @return array
1514 */
c3fc2621
CW
1515 public static function &import($prefix = FALSE) {
1516 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'contact', $prefix, []);
60808919 1517 return $r;
e501603b 1518 }
c3fc2621 1519
e501603b
TO
1520 /**
1521 * Returns the list of fields that can be exported
1522 *
1523 * @param bool $prefix
1524 *
1525 * @return array
1526 */
c3fc2621
CW
1527 public static function &export($prefix = FALSE) {
1528 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'contact', $prefix, []);
60808919 1529 return $r;
e501603b 1530 }
c3fc2621 1531
e7a6b91a
AS
1532 /**
1533 * Returns the list of indices
c3fc2621
CW
1534 *
1535 * @param bool $localize
1536 *
1537 * @return array
e7a6b91a
AS
1538 */
1539 public static function indices($localize = TRUE) {
c3fc2621
CW
1540 $indices = [
1541 'index_contact_type' => [
e7a6b91a 1542 'name' => 'index_contact_type',
c3fc2621 1543 'field' => [
e7a6b91a 1544 0 => 'contact_type',
c3fc2621
CW
1545 ],
1546 'localizable' => FALSE,
e7a6b91a 1547 'sig' => 'civicrm_contact::0::contact_type',
c3fc2621
CW
1548 ],
1549 'index_contact_sub_type' => [
e7a6b91a 1550 'name' => 'index_contact_sub_type',
c3fc2621 1551 'field' => [
e7a6b91a 1552 0 => 'contact_sub_type',
c3fc2621
CW
1553 ],
1554 'localizable' => FALSE,
e7a6b91a 1555 'sig' => 'civicrm_contact::0::contact_sub_type',
c3fc2621
CW
1556 ],
1557 'UI_external_identifier' => [
e7a6b91a 1558 'name' => 'UI_external_identifier',
c3fc2621 1559 'field' => [
e7a6b91a 1560 0 => 'external_identifier',
c3fc2621
CW
1561 ],
1562 'localizable' => FALSE,
1563 'unique' => TRUE,
e7a6b91a 1564 'sig' => 'civicrm_contact::1::external_identifier',
c3fc2621
CW
1565 ],
1566 'index_sort_name' => [
e7a6b91a 1567 'name' => 'index_sort_name',
c3fc2621 1568 'field' => [
e7a6b91a 1569 0 => 'sort_name',
c3fc2621
CW
1570 ],
1571 'localizable' => FALSE,
e7a6b91a 1572 'sig' => 'civicrm_contact::0::sort_name',
c3fc2621
CW
1573 ],
1574 'index_preferred_communication_method' => [
e7a6b91a 1575 'name' => 'index_preferred_communication_method',
c3fc2621 1576 'field' => [
e7a6b91a 1577 0 => 'preferred_communication_method',
c3fc2621
CW
1578 ],
1579 'localizable' => FALSE,
e7a6b91a 1580 'sig' => 'civicrm_contact::0::preferred_communication_method',
c3fc2621
CW
1581 ],
1582 'index_hash' => [
e7a6b91a 1583 'name' => 'index_hash',
c3fc2621 1584 'field' => [
e7a6b91a 1585 0 => 'hash',
c3fc2621
CW
1586 ],
1587 'localizable' => FALSE,
e7a6b91a 1588 'sig' => 'civicrm_contact::0::hash',
c3fc2621
CW
1589 ],
1590 'index_api_key' => [
e7a6b91a 1591 'name' => 'index_api_key',
c3fc2621 1592 'field' => [
e7a6b91a 1593 0 => 'api_key',
c3fc2621
CW
1594 ],
1595 'localizable' => FALSE,
e7a6b91a 1596 'sig' => 'civicrm_contact::0::api_key',
c3fc2621
CW
1597 ],
1598 'index_first_name' => [
e7a6b91a 1599 'name' => 'index_first_name',
c3fc2621 1600 'field' => [
e7a6b91a 1601 0 => 'first_name',
c3fc2621
CW
1602 ],
1603 'localizable' => FALSE,
e7a6b91a 1604 'sig' => 'civicrm_contact::0::first_name',
c3fc2621
CW
1605 ],
1606 'index_last_name' => [
e7a6b91a 1607 'name' => 'index_last_name',
c3fc2621 1608 'field' => [
e7a6b91a 1609 0 => 'last_name',
c3fc2621
CW
1610 ],
1611 'localizable' => FALSE,
e7a6b91a 1612 'sig' => 'civicrm_contact::0::last_name',
c3fc2621
CW
1613 ],
1614 'UI_prefix' => [
e7a6b91a 1615 'name' => 'UI_prefix',
c3fc2621 1616 'field' => [
e7a6b91a 1617 0 => 'prefix_id',
c3fc2621
CW
1618 ],
1619 'localizable' => FALSE,
e7a6b91a 1620 'sig' => 'civicrm_contact::0::prefix_id',
c3fc2621
CW
1621 ],
1622 'UI_suffix' => [
e7a6b91a 1623 'name' => 'UI_suffix',
c3fc2621 1624 'field' => [
e7a6b91a 1625 0 => 'suffix_id',
c3fc2621
CW
1626 ],
1627 'localizable' => FALSE,
e7a6b91a 1628 'sig' => 'civicrm_contact::0::suffix_id',
c3fc2621
CW
1629 ],
1630 'index_communication_style_id' => [
e7a6b91a 1631 'name' => 'index_communication_style_id',
c3fc2621 1632 'field' => [
e7a6b91a 1633 0 => 'communication_style_id',
c3fc2621
CW
1634 ],
1635 'localizable' => FALSE,
e7a6b91a 1636 'sig' => 'civicrm_contact::0::communication_style_id',
c3fc2621
CW
1637 ],
1638 'UI_gender' => [
e7a6b91a 1639 'name' => 'UI_gender',
c3fc2621 1640 'field' => [
e7a6b91a 1641 0 => 'gender_id',
c3fc2621
CW
1642 ],
1643 'localizable' => FALSE,
e7a6b91a 1644 'sig' => 'civicrm_contact::0::gender_id',
c3fc2621
CW
1645 ],
1646 'index_is_deceased' => [
27633545 1647 'name' => 'index_is_deceased',
c3fc2621 1648 'field' => [
27633545 1649 0 => 'is_deceased',
c3fc2621
CW
1650 ],
1651 'localizable' => FALSE,
27633545 1652 'sig' => 'civicrm_contact::0::is_deceased',
c3fc2621
CW
1653 ],
1654 'index_household_name' => [
e7a6b91a 1655 'name' => 'index_household_name',
c3fc2621 1656 'field' => [
e7a6b91a 1657 0 => 'household_name',
c3fc2621
CW
1658 ],
1659 'localizable' => FALSE,
e7a6b91a 1660 'sig' => 'civicrm_contact::0::household_name',
c3fc2621
CW
1661 ],
1662 'index_organization_name' => [
e7a6b91a 1663 'name' => 'index_organization_name',
c3fc2621 1664 'field' => [
e7a6b91a 1665 0 => 'organization_name',
c3fc2621
CW
1666 ],
1667 'localizable' => FALSE,
e7a6b91a 1668 'sig' => 'civicrm_contact::0::organization_name',
c3fc2621
CW
1669 ],
1670 'index_is_deleted_sort_name' => [
e7a6b91a 1671 'name' => 'index_is_deleted_sort_name',
c3fc2621 1672 'field' => [
e7a6b91a
AS
1673 0 => 'is_deleted',
1674 1 => 'sort_name',
1675 2 => 'id',
c3fc2621
CW
1676 ],
1677 'localizable' => FALSE,
e7a6b91a 1678 'sig' => 'civicrm_contact::0::is_deleted::sort_name::id',
c3fc2621 1679 ],
11e5567f 1680 'index_created_date' => [
1681 'name' => 'index_created_date',
1682 'field' => [
1683 0 => 'created_date',
1684 ],
1685 'localizable' => FALSE,
1686 'sig' => 'civicrm_contact::0::created_date',
1687 ],
1688 'index_modified_date' => [
1689 'name' => 'index_modified_date',
1690 'field' => [
1691 0 => 'modified_date',
1692 ],
1693 'localizable' => FALSE,
1694 'sig' => 'civicrm_contact::0::modified_date',
1695 ],
c3fc2621 1696 ];
e7a6b91a
AS
1697 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
1698 }
c3fc2621 1699
e501603b 1700}