From 8b64daac7215469ee60d6fcdb8a44654b1b85fb7 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Thu, 2 Nov 2017 11:46:45 -0400
Subject: [PATCH] Use CamelCase service name for future ServiceManager v3
 compatibility.

---
 module/VuFind/src/VuFind/Bootstrapper.php                   | 6 +++---
 module/VuFind/src/VuFind/View/Helper/Bootstrap3/Factory.php | 2 +-
 module/VuFindTheme/src/VuFindTheme/Initializer.php          | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/module/VuFind/src/VuFind/Bootstrapper.php b/module/VuFind/src/VuFind/Bootstrapper.php
index 269a9c298e9..72b941ec3c8 100644
--- a/module/VuFind/src/VuFind/Bootstrapper.php
+++ b/module/VuFind/src/VuFind/Bootstrapper.php
@@ -179,7 +179,7 @@ class Bootstrapper
     {
         $callback = function ($event) {
             $serviceManager = $event->getApplication()->getServiceManager();
-            $viewModel = $serviceManager->get('viewmanager')->getViewModel();
+            $viewModel = $serviceManager->get('ViewManager')->getViewModel();
 
             // Grab the template name from the first child -- we can use this to
             // figure out the current template context.
@@ -352,7 +352,7 @@ class Bootstrapper
                 }
             }
             // Send key values to view:
-            $viewModel = $sm->get('viewmanager')->getViewModel();
+            $viewModel = $sm->get('ViewManager')->getViewModel();
             $viewModel->setVariable('userLang', $language);
             $viewModel->setVariable('allLangs', $config->Languages);
             $rtlLangs = isset($config->LanguageSettings->rtl_langs)
@@ -473,7 +473,7 @@ class Bootstrapper
         // a user-friendly message instead of a fatal error.
         $callback = function ($event) {
             $serviceManager = $event->getApplication()->getServiceManager();
-            $viewModel = $serviceManager->get('viewmanager')->getViewModel();
+            $viewModel = $serviceManager->get('ViewManager')->getViewModel();
             $viewModel->renderingError = true;
         };
         $this->events->attach('render.error', $callback, 10000);
diff --git a/module/VuFind/src/VuFind/View/Helper/Bootstrap3/Factory.php b/module/VuFind/src/VuFind/View/Helper/Bootstrap3/Factory.php
index 7c7e0a0d402..b6d9b9c104d 100644
--- a/module/VuFind/src/VuFind/View/Helper/Bootstrap3/Factory.php
+++ b/module/VuFind/src/VuFind/View/Helper/Bootstrap3/Factory.php
@@ -75,7 +75,7 @@ class Factory
         // The right-to-left setting is injected into the layout by the Bootstrapper;
         // pull it back out here to avoid duplicate effort, then use it to apply
         // the mirror setting appropriately.
-        $layout = $sm->getServiceLocator()->get('viewmanager')->getViewModel();
+        $layout = $sm->getServiceLocator()->get('ViewManager')->getViewModel();
         if ($layout->rtl && $mirror) {
             $sidebarOnLeft = !$sidebarOnLeft;
         }
diff --git a/module/VuFindTheme/src/VuFindTheme/Initializer.php b/module/VuFindTheme/src/VuFindTheme/Initializer.php
index 61ff65e0212..e6e97c8c78e 100644
--- a/module/VuFindTheme/src/VuFindTheme/Initializer.php
+++ b/module/VuFindTheme/src/VuFindTheme/Initializer.php
@@ -269,7 +269,7 @@ class Initializer
     protected function sendThemeOptionsToView()
     {
         // Get access to the view model:
-        $viewModel = $this->serviceManager->get('viewmanager')->getViewModel();
+        $viewModel = $this->serviceManager->get('ViewManager')->getViewModel();
 
         // Send down the view options:
         $viewModel->setVariable('themeOptions', $this->getThemeOptions());
-- 
GitLab