(NFC) CRM/ - Update to pass new phpcs
[civicrm-core.git] / CRM / Contact / Page / View / Summary.php
index a881bbc5b63dd0d61e9753284efc06a4f166ca02..f91a87480b61f067667326e21b2a7e905e00d1d9 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018                                |
+ | Copyright CiviCRM LLC (c) 2004-2019                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
  */
 
 /**
@@ -316,40 +316,47 @@ class CRM_Contact_Page_View_Summary extends CRM_Contact_Page_View {
         'url' => '#contact-summary',
         'title' => ts('Summary'),
         'weight' => 0,
+        'icon' => 'crm-i fa-address-card-o'
       ],
       [
         'id' => 'activity',
         'title' => ts('Activities'),
         'class' => 'livePage',
         'weight' => 70,
+        'icon' => 'crm-i fa-tasks',
       ],
       [
         'id' => 'rel',
         'title' => ts('Relationships'),
         'class' => 'livePage',
         'weight' => 80,
+        'icon' => 'crm-i fa-handshake-o',
       ],
       [
         'id' => 'group',
         'title' => ts('Groups'),
         'class' => 'ajaxForm',
         'weight' => 90,
+        'icon' => 'crm-i fa-users',
       ],
       [
         'id' => 'note',
         'title' => ts('Notes'),
         'class' => 'livePage',
         'weight' => 100,
+        'icon' => 'crm-i fa-sticky-note-o',
       ],
       [
         'id' => 'tag',
         'title' => ts('Tags'),
         'weight' => 110,
+        'icon' => 'crm-i fa-tags',
       ],
       [
         'id' => 'log',
         'title' => ts('Change Log'),
         'weight' => 120,
+        'icon' => 'crm-i fa-history',
       ],
     ];
   }
@@ -391,6 +398,7 @@ class CRM_Contact_Page_View_Summary extends CRM_Contact_Page_View {
           'weight' => $elem['weight'],
           'count' => CRM_Contact_BAO_Contact::getCountComponent($u, $this->_contactId),
           'class' => 'livePage',
+          'icon' => $component->getIcon(),
         ];
       }
     }
@@ -403,10 +411,7 @@ class CRM_Contact_Page_View_Summary extends CRM_Contact_Page_View {
       }
       elseif ($accessCiviCRM && !empty($this->_viewOptions[$tab['id']])) {
         $allTabs[] = $tab + [
-          'url' => CRM_Utils_System::url(
-            "civicrm/contact/view/{$tab['id']}",
-            "reset=1&cid={$this->_contactId}"
-          ),
+          'url' => CRM_Utils_System::url("civicrm/contact/view/{$tab['id']}", "reset=1&cid={$this->_contactId}"),
           'count' => CRM_Contact_BAO_Contact::getCountComponent($tab['id'], $this->_contactId),
         ];
         $weight = $tab['weight'] + 10;
@@ -431,6 +436,7 @@ class CRM_Contact_Page_View_Summary extends CRM_Contact_Page_View {
         'count' => CRM_Contact_BAO_Contact::getCountComponent($id, $this->_contactId, $group['table_name']),
         'hideCount' => !$group['is_multiple'],
         'class' => 'livePage',
+        'icon' => 'crm-i fa-gear',
       ];
       $weight += 10;
     }