CRM-13678 - Make tabset hook generic
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Fri, 27 Nov 2015 11:11:17 +0000 (16:41 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Fri, 27 Nov 2015 11:11:17 +0000 (16:41 +0530)
CRM/Contact/Page/View/Summary.php
CRM/Contribute/Form/ContributionPage/TabHeader.php
CRM/Contribute/Page/ContributionPage.php
CRM/Utils/Hook.php

index eac81adab983c35fca70e1ed3bf6b0d4a8f482a2..877a871a1a8840b50cb5b9b3687906a44df01fda 100644 (file)
@@ -389,8 +389,9 @@ class CRM_Contact_Page_View_Summary extends CRM_Contact_Page_View {
       $weight += 10;
     }
 
+    $context = array('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
     usort($allTabs, array('CRM_Utils_Sort', 'cmpFunc'));
index 1bcbf3abfe6ca838b2305d346b5a43190ae5b606..7cd255ea257f10c7487a1b201d75ac407f216d65 100644 (file)
@@ -134,6 +134,7 @@ class CRM_Contribute_Form_ContributionPage_TabHeader {
     );
 
     $contribPageId = $form->getVar('_id');
+    CRM_Utils_Hook::tabset('civicrm/admin/contribute', $tabs, array('contribution_page_id' => $contribPageId));
     $fullName = $form->getVar('_name');
     $className = CRM_Utils_String::getClassName($fullName);
 
index a133520f249af4e750b72a5590b1a3ef3ba6c2bd..8c15d2f54cf3a1bb793db2122287d21c289fc7e7 100644 (file)
@@ -182,6 +182,11 @@ class CRM_Contribute_Page_ContributionPage extends CRM_Core_Page {
           'uniqueName' => 'pcp',
         ),
       );
+      $context = array(
+        'urlString' => $urlString,
+        'urlParams' => $urlParams
+      );
+      CRM_Utils_Hook::tabset('civicrm/admin/contribute', self::$_configureActionLinks, $context);
     }
 
     return self::$_configureActionLinks;
index 242a7b4d378b0f3b81b6ee396ae5cb598616e5be..39eee8a03b858d6b23b4fa7aa64b01f75abddc3a 100644 (file)
@@ -640,6 +640,7 @@ abstract class CRM_Utils_Hook {
    *   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(2, $tabs, $contactID,