From 39c3d5e9fbeca7a4e20754b176efb6b3f7ec3b4f Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 16 Jan 2015 03:35:01 -0800 Subject: [PATCH] CRM-15832 - Rename CRM_Core_Page_Angular to Civi\Angular\Page\Main --- CRM/Core/xml/Menu/Misc.xml | 2 +- .../Angular.php => Civi/Angular/Page/Main.php | 17 +++++++++-------- .../Angular.tpl => Civi/Angular/Page/Main.tpl} | 0 3 files changed, 10 insertions(+), 9 deletions(-) rename CRM/Core/Page/Angular.php => Civi/Angular/Page/Main.php (83%) rename templates/{CRM/Core/Page/Angular.tpl => Civi/Angular/Page/Main.tpl} (100%) diff --git a/CRM/Core/xml/Menu/Misc.xml b/CRM/Core/xml/Menu/Misc.xml index 98f96c99b8..0d023c655f 100644 --- a/CRM/Core/xml/Menu/Misc.xml +++ b/CRM/Core/xml/Menu/Misc.xml @@ -177,7 +177,7 @@ civicrm/a - CRM_Core_Page_Angular + \Civi\Angular\Page\Main access CiviCRM diff --git a/CRM/Core/Page/Angular.php b/Civi/Angular/Page/Main.php similarity index 83% rename from CRM/Core/Page/Angular.php rename to Civi/Angular/Page/Main.php index 59c4dc81ce..35c098a104 100644 --- a/CRM/Core/Page/Angular.php +++ b/Civi/Angular/Page/Main.php @@ -1,4 +1,5 @@ res = CRM_Core_Resources::singleton(); - $this->angular = Civi\Core\Container::singleton()->get('angular'); + $this->res = \CRM_Core_Resources::singleton(); + $this->angular = \Civi\Core\Container::singleton()->get('angular'); } /** @@ -59,13 +60,13 @@ class CRM_Core_Page_Angular extends CRM_Core_Page { $this->res->addSettingsFactory(function () use (&$modules) { // TODO optimization; client-side caching return array( - 'resourceUrls' => CRM_Extension_System::singleton()->getMapper()->getActiveModuleUrls(), + 'resourceUrls' => \CRM_Extension_System::singleton()->getMapper()->getActiveModuleUrls(), 'angular' => array( 'modules' => array_merge(array('ngRoute'), array_keys($modules)), 'cacheCode' => $this->res->getCacheCode(), ), 'crmAttachment' => array( - 'token' => CRM_Core_Page_AJAX_Attachment::createToken(), + 'token' => \CRM_Core_Page_AJAX_Attachment::createToken(), ), ); }); diff --git a/templates/CRM/Core/Page/Angular.tpl b/templates/Civi/Angular/Page/Main.tpl similarity index 100% rename from templates/CRM/Core/Page/Angular.tpl rename to templates/Civi/Angular/Page/Main.tpl -- 2.25.1