From 073aa90f505d7cf3ca7a4c4dd68a61dae8933cc4 Mon Sep 17 00:00:00 2001 From: kurund Date: Wed, 14 Aug 2013 11:42:14 +0530 Subject: [PATCH] CRM-13201, fixed profile search ---------------------------------------- * CRM-13201: Add alterTemplateFile hook http://issues.civicrm.org/jira/browse/CRM-13201 --- CRM/Core/Controller/Simple.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CRM/Core/Controller/Simple.php b/CRM/Core/Controller/Simple.php index 51e40e576b..6260796b03 100644 --- a/CRM/Core/Controller/Simple.php +++ b/CRM/Core/Controller/Simple.php @@ -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; + } } -- 2.25.1