Merge in 5.20
[civicrm-core.git] / CRM / Core / TableHierarchy.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12 /**
13 * Class representing the table relationships
14 *
15 * @package CRM
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 * $Id$
18 *
19 */
20 class CRM_Core_TableHierarchy {
21
22 /**
23 * This array defines weights for table, which are used to sort array of table in from clause
24 * @var array
25 */
26 public static $info = [
27 'civicrm_contact' => '01',
28 'civicrm_address' => '09',
29 'civicrm_county' => '10',
30 'civicrm_state_province' => '11',
31 'civicrm_country' => '12',
32 'civicrm_email' => '13',
33 'civicrm_phone' => '14',
34 'civicrm_im' => '15',
35 'civicrm_openid' => '17',
36 'civicrm_location_type' => '18',
37 'civicrm_group_contact' => '19',
38 'civicrm_group_contact_cache' => '20',
39 'civicrm_group' => '21',
40 'civicrm_subscription_history' => '22',
41 'civicrm_entity_tag' => '23',
42 'civicrm_note' => '24',
43 'civicrm_contribution' => '25',
44 'civicrm_financial_type' => '26',
45 'civicrm_participant' => '27',
46 'civicrm_event' => '28',
47 'civicrm_worldregion' => '29',
48 'civicrm_case_contact' => '30',
49 'civicrm_case' => '31',
50 'case_relationship' => '32',
51 'case_relation_type' => '33',
52 'civicrm_activity' => '34',
53 'civicrm_mailing_summary' => '35',
54 'civicrm_mailing_recipients' => '36',
55 'civicrm_mailing' => '37',
56 'civicrm_mailing_job' => '38',
57 'civicrm_mailing_event_queue' => '39',
58 'civicrm_mailing_event_bounce' => '40',
59 'civicrm_mailing_event_opened' => '41',
60 'civicrm_mailing_event_reply' => '42',
61 'civicrm_mailing_event_trackable_url_open' => '43',
62 ];
63
64 /**
65 * @return array
66 */
67 public static function &info() {
68 //get the campaign related tables.
69 CRM_Campaign_BAO_Query::info(self::$info);
70
71 return self::$info;
72 }
73
74 }