Skip to content

Commit

Permalink
Remove deprecated hook_civicrm_tabs
Browse files Browse the repository at this point in the history
This hook has been deprecated for 5 years. Time to remove it.
  • Loading branch information
colemanw committed Sep 17, 2020
1 parent bbb0539 commit 9887250
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
3 changes: 1 addition & 2 deletions CRM/Contact/Page/View/Summary.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,8 @@ public function getTabs() {
$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
Expand Down
17 changes: 0 additions & 17 deletions CRM/Utils/Hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -825,23 +825,6 @@ public static function buildStateProvinceForCountry($countryID, &$states) {
);
}

/**
* 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.
Expand Down

0 comments on commit 9887250

Please sign in to comment.