From 634731e3f9ccf5847365650a65c01030c3a8fcd9 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Thu, 2 Nov 2017 13:58:03 -0400
Subject: [PATCH] Normalize case of view helper service names (#1070)

---
 .../src/VuFind/View/Helper/Root/Factory.php   |  4 +-
 module/VuFindTheme/Module.php                 | 10 ++---
 themes/bootstrap3/templates/error/index.phtml |  2 +-
 .../bootstrap3/templates/install/home.phtml   |  2 +-
 .../bootstrap3/templates/layout/layout.phtml  |  4 +-
 themes/bootstrap3/theme.config.php            |  2 +-
 themes/root/theme.config.php                  | 44 +++++++++----------
 7 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Factory.php b/module/VuFind/src/VuFind/View/Helper/Root/Factory.php
index 1051a910c37..fad1fa48732 100644
--- a/module/VuFind/src/VuFind/View/Helper/Root/Factory.php
+++ b/module/VuFind/src/VuFind/View/Helper/Root/Factory.php
@@ -305,7 +305,7 @@ class Factory
         $config = $sm->getServiceLocator()->get('VuFind\Config')->get('config');
         $config = isset($config->SearchHistoryLabels)
             ? $config->SearchHistoryLabels->toArray() : [];
-        return new HistoryLabel($config, $sm->get('transesc'));
+        return new HistoryLabel($config, $sm->get('transEsc'));
     }
 
     /**
@@ -329,7 +329,7 @@ class Factory
      */
     public static function getJsTranslations(ServiceManager $sm)
     {
-        return new JsTranslations($sm->get('transesc'));
+        return new JsTranslations($sm->get('transEsc'));
     }
 
     /**
diff --git a/module/VuFindTheme/Module.php b/module/VuFindTheme/Module.php
index 83ed0953eef..d595b82b6a2 100644
--- a/module/VuFindTheme/Module.php
+++ b/module/VuFindTheme/Module.php
@@ -89,12 +89,12 @@ class Module
     {
         return [
             'factories' => [
-                'headlink' => 'VuFindTheme\View\Helper\Factory::getHeadLink',
-                'headscript' => 'VuFindTheme\View\Helper\Factory::getHeadScript',
-                'headthemeresources' =>
+                'headLink' => 'VuFindTheme\View\Helper\Factory::getHeadLink',
+                'headScript' => 'VuFindTheme\View\Helper\Factory::getHeadScript',
+                'headThemeResources' =>
                     'VuFindTheme\View\Helper\Factory::getHeadThemeResources',
-                'imagelink' => 'VuFindTheme\View\Helper\Factory::getImageLink',
-                'inlinescript' =>
+                'imageLink' => 'VuFindTheme\View\Helper\Factory::getImageLink',
+                'inlineScript' =>
                     'VuFindTheme\View\Helper\Factory::getInlineScript',
                 'mobileurl' => 'VuFindTheme\View\Helper\Factory::getMobileUrl',
             ],
diff --git a/themes/bootstrap3/templates/error/index.phtml b/themes/bootstrap3/templates/error/index.phtml
index 36ac5fb44d0..58595140071 100644
--- a/themes/bootstrap3/templates/error/index.phtml
+++ b/themes/bootstrap3/templates/error/index.phtml
@@ -10,7 +10,7 @@
   <p>
     <?=$this->transEsc('Please contact the Library Reference Department for assistance')?>
     <br/>
-    <? $supportEmail = $this->escapeHtmlAttr($this->systememail()); ?>
+    <? $supportEmail = $this->escapeHtmlAttr($this->systemEmail()); ?>
     <a href="mailto:<?=$supportEmail?>"><?=$supportEmail?></a>
   </p>
 </div>
diff --git a/themes/bootstrap3/templates/install/home.phtml b/themes/bootstrap3/templates/install/home.phtml
index 920c45cfbb9..a2ba043078f 100644
--- a/themes/bootstrap3/templates/install/home.phtml
+++ b/themes/bootstrap3/templates/install/home.phtml
@@ -9,7 +9,7 @@
 <?=$this->flashmessages()?>
 <? $errors = 0; foreach ($this->checks as $check): ?>
 <? if (!$check['status']) $errors++; ?>
-  <div class="alert alert-<?=$check['status'] ? 'success':'danger'?>"><?=$this->escapeHtml($check['title'])?>... <?=$check['status'] ? $this->transEsc('test_ok') : $this->transesc('test_fail') . ' <a class="btn btn-danger" href="' . $this->url('install-' . strtolower($check['fix'])) . '">' . $this->transEsc('test_fix') . '</a>' ?></div>
+  <div class="alert alert-<?=$check['status'] ? 'success':'danger'?>"><?=$this->escapeHtml($check['title'])?>... <?=$check['status'] ? $this->transEsc('test_ok') : $this->transEsc('test_fail') . ' <a class="btn btn-danger" href="' . $this->url('install-' . strtolower($check['fix'])) . '">' . $this->transEsc('test_fix') . '</a>' ?></div>
 <? endforeach; ?>
 
 <? if ($errors == 0): ?>
diff --git a/themes/bootstrap3/templates/layout/layout.phtml b/themes/bootstrap3/templates/layout/layout.phtml
index 6088db3ef66..c81d4f81c9c 100644
--- a/themes/bootstrap3/templates/layout/layout.phtml
+++ b/themes/bootstrap3/templates/layout/layout.phtml
@@ -102,9 +102,9 @@
       }
 
       // Session keep-alive
-      if ($this->KeepAlive()) {
+      if ($this->keepAlive()) {
           $this->headScript()->appendScript('var keepAliveInterval = '
-            . $this->KeepAlive());
+            . $this->keepAlive());
           $this->headScript()->appendFile("keep_alive.js");
       }
     ?>
diff --git a/themes/bootstrap3/theme.config.php b/themes/bootstrap3/theme.config.php
index c2a266cbba5..c8a8b85eae1 100644
--- a/themes/bootstrap3/theme.config.php
+++ b/themes/bootstrap3/theme.config.php
@@ -29,7 +29,7 @@ return [
     'helpers' => [
         'factories' => [
             'flashmessages' => 'VuFind\View\Helper\Bootstrap3\Factory::getFlashmessages',
-            'layoutclass' => 'VuFind\View\Helper\Bootstrap3\Factory::getLayoutClass',
+            'layoutClass' => 'VuFind\View\Helper\Bootstrap3\Factory::getLayoutClass',
             'recaptcha' => 'VuFind\View\Helper\Bootstrap3\Factory::getRecaptcha',
         ],
         'invokables' => [
diff --git a/themes/root/theme.config.php b/themes/root/theme.config.php
index b8915372f43..22d3826962f 100644
--- a/themes/root/theme.config.php
+++ b/themes/root/theme.config.php
@@ -3,43 +3,43 @@ return [
     'extends' => false,
     'helpers' => [
         'factories' => [
-            'accountcapabilities' => 'VuFind\View\Helper\Root\Factory::getAccountCapabilities',
-            'addthis' => 'VuFind\View\Helper\Root\Factory::getAddThis',
+            'accountCapabilities' => 'VuFind\View\Helper\Root\Factory::getAccountCapabilities',
+            'addThis' => 'VuFind\View\Helper\Root\Factory::getAddThis',
             'alphabrowse' => 'VuFind\View\Helper\Root\Factory::getAlphaBrowse',
             'auth' => 'VuFind\View\Helper\Root\Factory::getAuth',
-            'authornotes' => 'VuFind\View\Helper\Root\Factory::getAuthorNotes',
+            'authorNotes' => 'VuFind\View\Helper\Root\Factory::getAuthorNotes',
             'cart' => 'VuFind\View\Helper\Root\Factory::getCart',
             'citation' => 'VuFind\View\Helper\Root\Factory::getCitation',
-            'datetime' => 'VuFind\View\Helper\Root\Factory::getDateTime',
-            'displaylanguageoption' => 'VuFind\View\Helper\Root\Factory::getDisplayLanguageOption',
+            'dateTime' => 'VuFind\View\Helper\Root\Factory::getDateTime',
+            'displayLanguageOption' => 'VuFind\View\Helper\Root\Factory::getDisplayLanguageOption',
             'export' => 'VuFind\View\Helper\Root\Factory::getExport',
             'feedback' => 'VuFind\View\Helper\Root\Factory::getFeedback',
             'flashmessages' => 'VuFind\View\Helper\Root\Factory::getFlashmessages',
             'geocoords' => 'VuFind\View\Helper\Root\Factory::getGeoCoords',
             'googleanalytics' => 'VuFind\View\Helper\Root\Factory::getGoogleAnalytics',
-            'helptext' => 'VuFind\View\Helper\Root\Factory::getHelpText',
+            'helpText' => 'VuFind\View\Helper\Root\Factory::getHelpText',
             'historylabel' => 'VuFind\View\Helper\Root\Factory::getHistoryLabel',
             'ils' => 'VuFind\View\Helper\Root\Factory::getIls',
-            'jstranslations' => 'VuFind\View\Helper\Root\Factory::getJsTranslations',
-            'keepalive' => 'VuFind\View\Helper\Root\Factory::getKeepAlive',
+            'jsTranslations' => 'VuFind\View\Helper\Root\Factory::getJsTranslations',
+            'keepAlive' => 'VuFind\View\Helper\Root\Factory::getKeepAlive',
             'permission' => 'VuFind\View\Helper\Root\Factory::getPermission',
-            'proxyurl' => 'VuFind\View\Helper\Root\Factory::getProxyUrl',
-            'openurl' => 'VuFind\View\Helper\Root\Factory::getOpenUrl',
+            'proxyUrl' => 'VuFind\View\Helper\Root\Factory::getProxyUrl',
+            'openUrl' => 'VuFind\View\Helper\Root\Factory::getOpenUrl',
             'piwik' => 'VuFind\View\Helper\Root\Factory::getPiwik',
             'recaptcha' => 'VuFind\View\Helper\Root\Factory::getRecaptcha',
             'record' => 'VuFind\View\Helper\Root\Factory::getRecord',
-            'recorddataformatter' => 'VuFind\View\Helper\Root\RecordDataFormatterFactory',
-            'recordlink' => 'VuFind\View\Helper\Root\Factory::getRecordLink',
+            'recordDataFormatter' => 'VuFind\View\Helper\Root\RecordDataFormatterFactory',
+            'recordLink' => 'VuFind\View\Helper\Root\Factory::getRecordLink',
             'related' => 'VuFind\View\Helper\Root\Factory::getRelated',
-            'safemoneyformat' => 'VuFind\View\Helper\Root\Factory::getSafeMoneyFormat',
+            'safeMoneyFormat' => 'VuFind\View\Helper\Root\Factory::getSafeMoneyFormat',
             'searchbox' => 'VuFind\View\Helper\Root\Factory::getSearchBox',
-            'searchmemory' => 'VuFind\View\Helper\Root\Factory::getSearchMemory',
-            'searchoptions' => 'VuFind\View\Helper\Root\Factory::getSearchOptions',
-            'searchparams' => 'VuFind\View\Helper\Root\Factory::getSearchParams',
+            'searchMemory' => 'VuFind\View\Helper\Root\Factory::getSearchMemory',
+            'searchOptions' => 'VuFind\View\Helper\Root\Factory::getSearchOptions',
+            'searchParams' => 'VuFind\View\Helper\Root\Factory::getSearchParams',
             'searchtabs' => 'VuFind\View\Helper\Root\Factory::getSearchTabs',
             'summaries' => 'VuFind\View\Helper\Root\Factory::getSummaries',
-            'syndeticsplus' => 'VuFind\View\Helper\Root\Factory::getSyndeticsPlus',
-            'systememail' => 'VuFind\View\Helper\Root\Factory::getSystemEmail',
+            'syndeticsPlus' => 'VuFind\View\Helper\Root\Factory::getSyndeticsPlus',
+            'systemEmail' => 'VuFind\View\Helper\Root\Factory::getSystemEmail',
             'userlist' => 'VuFind\View\Helper\Root\Factory::getUserList',
             'usertags' => 'VuFind\View\Helper\Root\Factory::getUserTags',
         ],
@@ -47,17 +47,17 @@ return [
             'addellipsis' => 'VuFind\View\Helper\Root\AddEllipsis',
             'browse' => 'VuFind\View\Helper\Root\Browse',
             'context' => 'VuFind\View\Helper\Root\Context',
-            'currentpath' => 'VuFind\View\Helper\Root\CurrentPath',
+            'currentPath' => 'VuFind\View\Helper\Root\CurrentPath',
             'highlight' => 'VuFind\View\Helper\Root\Highlight',
             'jqueryvalidation' => 'VuFind\View\Helper\Root\JqueryValidation',
             'localizedNumber' => 'VuFind\View\Helper\Root\LocalizedNumber',
             'printms' => 'VuFind\View\Helper\Root\Printms',
             'recommend' => 'VuFind\View\Helper\Root\Recommend',
-            'renderarray' => 'VuFind\View\Helper\Root\RenderArray',
+            'renderArray' => 'VuFind\View\Helper\Root\RenderArray',
             'resultfeed' => 'VuFind\View\Helper\Root\ResultFeed',
-            'sortfacetlist' => 'VuFind\View\Helper\Root\SortFacetList',
+            'sortFacetList' => 'VuFind\View\Helper\Root\SortFacetList',
             'summon' => 'VuFind\View\Helper\Root\Summon',
-            'transesc' => 'VuFind\View\Helper\Root\TransEsc',
+            'transEsc' => 'VuFind\View\Helper\Root\TransEsc',
             'translate' => 'VuFind\View\Helper\Root\Translate',
             'truncate' => 'VuFind\View\Helper\Root\Truncate',
         ]
-- 
GitLab