Merge pull request #15843 from totten/master-simplehead
[civicrm-core.git] / CRM / Core / TableHierarchy.php
CommitLineData
6a488035 1<?php
6a488035
TO
2/*
3 +--------------------------------------------------------------------+
bc77d7c0 4 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 5 | |
bc77d7c0
TO
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 |
6a488035 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
6a488035
TO
11
12/**
13 * Class representing the table relationships
14 *
15 * @package CRM
ca5cec67 16 * @copyright CiviCRM LLC https://civicrm.org/licensing
6a488035
TO
17 * $Id$
18 *
19 */
20class 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
6a488035 25 */
518fa0ee 26 public static $info = [
6a488035
TO
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',
0cd50623 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',
be2fb01f 62 ];
6a488035 63
a0ee3941
EM
64 /**
65 * @return array
66 */
00be9182 67 public static function &info() {
6a488035
TO
68 //get the campaign related tables.
69 CRM_Campaign_BAO_Query::info(self::$info);
70
71 return self::$info;
72 }
96025800 73
6a488035 74}