From 988725035b0f82e76ff23e330253c021dd226950 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 17 Sep 2020 14:40:38 -0400 Subject: [PATCH] Remove deprecated hook_civicrm_tabs This hook has been deprecated for 5 years. Time to remove it. --- CRM/Contact/Page/View/Summary.php | 3 +-- CRM/Utils/Hook.php | 17 ----------------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/CRM/Contact/Page/View/Summary.php b/CRM/Contact/Page/View/Summary.php index a9f61ee85c..e173a8df54 100644 --- a/CRM/Contact/Page/View/Summary.php +++ b/CRM/Contact/Page/View/Summary.php @@ -425,9 +425,8 @@ class CRM_Contact_Page_View_Summary extends CRM_Contact_Page_View { $weight += 10; } + // Allow other modules to add or remove tabs $context = ['contact_id' => $this->_contactId]; - // see if any other modules want to add any tabs - CRM_Utils_Hook::tabs($allTabs, $this->_contactId); CRM_Utils_Hook::tabset('civicrm/contact/view', $allTabs, $context); // now sort the tabs based on weight diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index 17532b2bb8..7a79fdbf0b 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -825,23 +825,6 @@ abstract class CRM_Utils_Hook { ); } - /** - * This hook is called when rendering the tabs for a contact (q=civicrm/contact/view)c - * - * @param array $tabs - * The array of tabs that will be displayed. - * @param int $contactID - * The contactID for whom the dashboard is being rendered. - * - * @return null - * @deprecated Use tabset() instead. - */ - public static function tabs(&$tabs, $contactID) { - return self::singleton()->invoke(['tabs', 'contactID'], $tabs, $contactID, - self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_tabs' - ); - } - /** * This hook is called when rendering the tabs used for events and potentially * contribution pages, etc. -- 2.25.1