From 7d93bcc473635ab1d07a9f823c7071aa992c5935 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 14 Dec 2013 15:56:35 -0800 Subject: [PATCH] CRM-13970 - Add helper for getting page path --- CRM/Core/Invoke.php | 1 + CRM/Core/Page.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CRM/Core/Invoke.php b/CRM/Core/Invoke.php index b3bc1a5267..e1d73b7807 100644 --- a/CRM/Core/Invoke.php +++ b/CRM/Core/Invoke.php @@ -307,6 +307,7 @@ class CRM_Core_Invoke { $title = CRM_Utils_Array::value('title', $item); if (strstr($item['page_callback'], '_Page')) { $object = new $item['page_callback'] ($title, $mode ); + $object->urlPath = $_GET[$config->userFrameworkURLVar]; } elseif (strstr($item['page_callback'], '_Controller')) { $addSequence = 'false'; diff --git a/CRM/Core/Page.php b/CRM/Core/Page.php index 4ac7d41c09..83b6dc3b09 100644 --- a/CRM/Core/Page.php +++ b/CRM/Core/Page.php @@ -111,6 +111,13 @@ class CRM_Core_Page { */ public $ajaxResponse = array(); + /** + * Url path used to reach this page + * + * @var array + */ + public $urlPath = array(); + /** * class constructor * -- 2.25.1