CRM-13201, fixed profile search
authorkurund <kurund@civicrm.org>
Wed, 14 Aug 2013 06:12:14 +0000 (11:42 +0530)
committerkurund <kurund@civicrm.org>
Wed, 14 Aug 2013 06:12:14 +0000 (11:42 +0530)
----------------------------------------
* CRM-13201: Add alterTemplateFile hook
  http://issues.civicrm.org/jira/browse/CRM-13201

CRM/Core/Controller/Simple.php

index 51e40e576b9b1a97edbf62146f91e16f251efc52..6260796b03789b615921a68f93069269b5602b83 100644 (file)
@@ -115,5 +115,15 @@ class CRM_Core_Controller_Simple extends CRM_Core_Controller {
 
     return $this->_pages[$pageName]->getTemplateFileName();
   }
+
+  /**
+   * A wrapper for getTemplateFileName that includes calling the hook to
+   * prevent us from having to copy & paste the logic of calling the hook
+   */
+  function getHookedTemplateFileName() {
+    $pageTemplateFile = $this->getTemplateFileName();
+    CRM_Utils_Hook::alterTemplateFile(get_class($this), $this, 'page', $pageTemplateFile);
+    return $pageTemplateFile;
+  }
 }