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