diff --git a/themes/vufind/blueprint/helpers/LayoutClass.php b/module/VuFind/src/VuFind/Theme/Blueprint/Helper/LayoutClass.php similarity index 100% rename from themes/vufind/blueprint/helpers/LayoutClass.php rename to module/VuFind/src/VuFind/Theme/Blueprint/Helper/LayoutClass.php diff --git a/themes/vufind/blueprint/helpers/Search.php b/module/VuFind/src/VuFind/Theme/Blueprint/Helper/Search.php similarity index 100% rename from themes/vufind/blueprint/helpers/Search.php rename to module/VuFind/src/VuFind/Theme/Blueprint/Helper/Search.php diff --git a/module/VuFind/src/VuFind/Theme/Initializer.php b/module/VuFind/src/VuFind/Theme/Initializer.php index 5fec8bab79a4f4346530c627f2a68756f5cd27a1..9cde9aa8dac087f504b589af3e0a484e5cdc6fa8 100644 --- a/module/VuFind/src/VuFind/Theme/Initializer.php +++ b/module/VuFind/src/VuFind/Theme/Initializer.php @@ -44,7 +44,6 @@ use VuFind\Mobile, */ class Initializer { - protected $autoLoader; protected $config; protected $event; protected $resourceContainer; @@ -70,9 +69,6 @@ class Initializer $this->event = $event; $this->baseDir = call_user_func(array($tools, 'getBaseDir')); - // Create a class loader for helper management: - $this->autoLoader = $this->getAutoloader(); - // Grab the service manager for convenience: $this->serviceManager = $this->event->getApplication()->getServiceManager(); @@ -84,20 +80,6 @@ class Initializer $this->session = call_user_func(array($tools, 'getPersistenceContainer')); } - /** - * Retrieve the Zend autoloader from PHP. - * - * @return Zend\Loader\StandardAutoloader - */ - protected function getAutoloader() - { - $loader = array_pop(spl_autoload_functions()); - if (!is_a($loader[0], 'Zend\Loader\StandardAutoloader')) { - throw new \Exception('Could not find registered autoloader!'); - } - return $loader[0]; - } - /** * Adjust template injection to a strategy that works better with our themes. * This needs to be called prior to the dispatch event, which is why it is a @@ -323,11 +305,6 @@ class Initializer return; } - // Register the theme's namespace - $this->autoLoader->registerNamespace( - $namespace, $this->baseDir . "/$theme/helpers" - ); - // Grab the helper loader from the view manager: $loader = $this->serviceManager->get('viewmanager')->getHelperLoader(); diff --git a/themes/vufind/root/helpers/AddEllipsis.php b/module/VuFind/src/VuFind/Theme/Root/Helper/AddEllipsis.php similarity index 100% rename from themes/vufind/root/helpers/AddEllipsis.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/AddEllipsis.php diff --git a/themes/vufind/root/helpers/AddThis.php b/module/VuFind/src/VuFind/Theme/Root/Helper/AddThis.php similarity index 100% rename from themes/vufind/root/helpers/AddThis.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/AddThis.php diff --git a/themes/vufind/root/helpers/Auth.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Auth.php similarity index 100% rename from themes/vufind/root/helpers/Auth.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/Auth.php diff --git a/themes/vufind/root/helpers/AuthorNotes.php b/module/VuFind/src/VuFind/Theme/Root/Helper/AuthorNotes.php similarity index 100% rename from themes/vufind/root/helpers/AuthorNotes.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/AuthorNotes.php diff --git a/themes/vufind/root/helpers/Browse.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Browse.php similarity index 100% rename from themes/vufind/root/helpers/Browse.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/Browse.php diff --git a/themes/vufind/root/helpers/Citation.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Citation.php similarity index 100% rename from themes/vufind/root/helpers/Citation.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/Citation.php diff --git a/themes/vufind/root/helpers/Context.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Context.php similarity index 100% rename from themes/vufind/root/helpers/Context.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/Context.php diff --git a/themes/vufind/root/helpers/DisplayDateFormat.php b/module/VuFind/src/VuFind/Theme/Root/Helper/DisplayDateFormat.php similarity index 100% rename from themes/vufind/root/helpers/DisplayDateFormat.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/DisplayDateFormat.php diff --git a/themes/vufind/root/helpers/DisplayLanguageOption.php b/module/VuFind/src/VuFind/Theme/Root/Helper/DisplayLanguageOption.php similarity index 100% rename from themes/vufind/root/helpers/DisplayLanguageOption.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/DisplayLanguageOption.php diff --git a/themes/vufind/root/helpers/Excerpt.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Excerpt.php similarity index 100% rename from themes/vufind/root/helpers/Excerpt.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/Excerpt.php diff --git a/themes/vufind/root/helpers/Flashmessages.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Flashmessages.php similarity index 100% rename from themes/vufind/root/helpers/Flashmessages.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/Flashmessages.php diff --git a/themes/vufind/root/helpers/FullUrl.php b/module/VuFind/src/VuFind/Theme/Root/Helper/FullUrl.php similarity index 100% rename from themes/vufind/root/helpers/FullUrl.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/FullUrl.php diff --git a/themes/vufind/root/helpers/GetLastSearchLink.php b/module/VuFind/src/VuFind/Theme/Root/Helper/GetLastSearchLink.php similarity index 100% rename from themes/vufind/root/helpers/GetLastSearchLink.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/GetLastSearchLink.php diff --git a/themes/vufind/root/helpers/HeadLink.php b/module/VuFind/src/VuFind/Theme/Root/Helper/HeadLink.php similarity index 98% rename from themes/vufind/root/helpers/HeadLink.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/HeadLink.php index 7f59b32e3b0ead2116c8e6cc5c97558318dd0a3b..f4be64e333837169700079ff63b684ad37130d34 100644 --- a/themes/vufind/root/helpers/HeadLink.php +++ b/module/VuFind/src/VuFind/Theme/Root/Helper/HeadLink.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org/wiki/building_a_recommendations_module Wiki */ -namespace VuFindThemes\Root\Helpers; +namespace VuFind\Theme\Root\Helper; use VuFind\Theme\Tools as ThemeTools; /** diff --git a/themes/vufind/root/helpers/HeadScript.php b/module/VuFind/src/VuFind/Theme/Root/Helper/HeadScript.php similarity index 98% rename from themes/vufind/root/helpers/HeadScript.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/HeadScript.php index de4a235bde32d0a59fd79f3b66c18687f2b2cc34..85dad353b9c35814b41b10f45996d0788fefdf4b 100644 --- a/themes/vufind/root/helpers/HeadScript.php +++ b/module/VuFind/src/VuFind/Theme/Root/Helper/HeadScript.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org/wiki/building_a_recommendations_module Wiki */ -namespace VuFindThemes\Root\Helpers; +namespace VuFind\Theme\Root\Helper; use VuFind\Theme\Tools as ThemeTools; /** diff --git a/themes/vufind/root/helpers/HeadThemeResources.php b/module/VuFind/src/VuFind/Theme/Root/Helper/HeadThemeResources.php similarity index 98% rename from themes/vufind/root/helpers/HeadThemeResources.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/HeadThemeResources.php index 7c146c506cd74da9878e85bd3b0366c38d173cbc..f112ae822e331b77cd204a524c10d965f0fb2937 100644 --- a/themes/vufind/root/helpers/HeadThemeResources.php +++ b/module/VuFind/src/VuFind/Theme/Root/Helper/HeadThemeResources.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org/wiki/building_a_recommendations_module Wiki */ -namespace VuFindThemes\Root\Helpers; +namespace VuFind\Theme\Root\Helper; use VuFind\Theme\Tools as ThemeTools, Zend\View\Helper\AbstractHelper; diff --git a/themes/vufind/root/helpers/Highlight.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Highlight.php similarity index 100% rename from themes/vufind/root/helpers/Highlight.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/Highlight.php diff --git a/themes/vufind/root/helpers/ImageLink.php b/module/VuFind/src/VuFind/Theme/Root/Helper/ImageLink.php similarity index 98% rename from themes/vufind/root/helpers/ImageLink.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/ImageLink.php index 425d6f93ed0da210253dd9edf6d1dfb585cf94d9..ffb815d5589f719d9f4bd298b46bec5d842df897 100644 --- a/themes/vufind/root/helpers/ImageLink.php +++ b/module/VuFind/src/VuFind/Theme/Root/Helper/ImageLink.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -namespace VuFindThemes\Root\Helpers; +namespace VuFind\Theme\Root\Helper; use VuFind\Theme\Tools as ThemeTools, Zend\View\Helper\AbstractHelper; diff --git a/themes/vufind/root/helpers/InlineScript.php b/module/VuFind/src/VuFind/Theme/Root/Helper/InlineScript.php similarity index 100% rename from themes/vufind/root/helpers/InlineScript.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/InlineScript.php diff --git a/themes/vufind/root/helpers/JqueryValidation.php b/module/VuFind/src/VuFind/Theme/Root/Helper/JqueryValidation.php similarity index 100% rename from themes/vufind/root/helpers/JqueryValidation.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/JqueryValidation.php diff --git a/themes/vufind/root/helpers/MobileUrl.php b/module/VuFind/src/VuFind/Theme/Root/Helper/MobileUrl.php similarity index 98% rename from themes/vufind/root/helpers/MobileUrl.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/MobileUrl.php index bc9d9488b4d7743ba85e570168a2b34cedcc041d..68652496a5f8ae1048a74bcd3d710da7341ab2d5 100644 --- a/themes/vufind/root/helpers/MobileUrl.php +++ b/module/VuFind/src/VuFind/Theme/Root/Helper/MobileUrl.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org/wiki/building_a_recommendations_module Wiki */ -namespace VuFindThemes\Root\Helpers; +namespace VuFind\Theme\Root\Helper; use VuFind\Mobile, Zend\View\Helper\AbstractHelper; diff --git a/themes/vufind/root/helpers/OpenUrl.php b/module/VuFind/src/VuFind/Theme/Root/Helper/OpenUrl.php similarity index 100% rename from themes/vufind/root/helpers/OpenUrl.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/OpenUrl.php diff --git a/themes/vufind/root/helpers/Printms.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Printms.php similarity index 100% rename from themes/vufind/root/helpers/Printms.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/Printms.php diff --git a/themes/vufind/root/helpers/ProxyUrl.php b/module/VuFind/src/VuFind/Theme/Root/Helper/ProxyUrl.php similarity index 100% rename from themes/vufind/root/helpers/ProxyUrl.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/ProxyUrl.php diff --git a/themes/vufind/root/helpers/Recommend.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Recommend.php similarity index 100% rename from themes/vufind/root/helpers/Recommend.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/Recommend.php diff --git a/themes/vufind/root/helpers/Record.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Record.php similarity index 100% rename from themes/vufind/root/helpers/Record.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/Record.php diff --git a/themes/vufind/root/helpers/RecordLink.php b/module/VuFind/src/VuFind/Theme/Root/Helper/RecordLink.php similarity index 100% rename from themes/vufind/root/helpers/RecordLink.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/RecordLink.php diff --git a/themes/vufind/root/helpers/Related.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Related.php similarity index 100% rename from themes/vufind/root/helpers/Related.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/Related.php diff --git a/themes/vufind/root/helpers/RenderArray.php b/module/VuFind/src/VuFind/Theme/Root/Helper/RenderArray.php similarity index 100% rename from themes/vufind/root/helpers/RenderArray.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/RenderArray.php diff --git a/themes/vufind/root/helpers/ResultFeed.php b/module/VuFind/src/VuFind/Theme/Root/Helper/ResultFeed.php similarity index 100% rename from themes/vufind/root/helpers/ResultFeed.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/ResultFeed.php diff --git a/themes/vufind/root/helpers/Reviews.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Reviews.php similarity index 100% rename from themes/vufind/root/helpers/Reviews.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/Reviews.php diff --git a/themes/vufind/root/helpers/SafeMoneyFormat.php b/module/VuFind/src/VuFind/Theme/Root/Helper/SafeMoneyFormat.php similarity index 100% rename from themes/vufind/root/helpers/SafeMoneyFormat.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/SafeMoneyFormat.php diff --git a/themes/vufind/root/helpers/SearchOptions.php b/module/VuFind/src/VuFind/Theme/Root/Helper/SearchOptions.php similarity index 100% rename from themes/vufind/root/helpers/SearchOptions.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/SearchOptions.php diff --git a/themes/vufind/root/helpers/SortFacetList.php b/module/VuFind/src/VuFind/Theme/Root/Helper/SortFacetList.php similarity index 100% rename from themes/vufind/root/helpers/SortFacetList.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/SortFacetList.php diff --git a/themes/vufind/root/helpers/SyndeticsPlus.php b/module/VuFind/src/VuFind/Theme/Root/Helper/SyndeticsPlus.php similarity index 100% rename from themes/vufind/root/helpers/SyndeticsPlus.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/SyndeticsPlus.php diff --git a/themes/vufind/root/helpers/TransEsc.php b/module/VuFind/src/VuFind/Theme/Root/Helper/TransEsc.php similarity index 98% rename from themes/vufind/root/helpers/TransEsc.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/TransEsc.php index bed44952dbd0df8defb5bd1158c84601f9cc3ff0..d36ba81dc6470ab14f3f3fcdc0a130da1eeaefc5 100644 --- a/themes/vufind/root/helpers/TransEsc.php +++ b/module/VuFind/src/VuFind/Theme/Root/Helper/TransEsc.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org/wiki/building_a_recommendations_module Wiki */ -namespace VuFindThemes\Root\Helpers; +namespace VuFind\Theme\Root\Helper; use Zend\View\Helper\AbstractHelper; /** diff --git a/themes/vufind/root/helpers/Translate.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Translate.php similarity index 98% rename from themes/vufind/root/helpers/Translate.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/Translate.php index 0884b782c40bcdbe7b0afe00093082f2b2f1a712..b9676c053eb5871cba59dd3f5deba2c8cb89f3cc 100644 --- a/themes/vufind/root/helpers/Translate.php +++ b/module/VuFind/src/VuFind/Theme/Root/Helper/Translate.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org/wiki/building_a_recommendations_module Wiki */ -namespace VuFindThemes\Root\Helpers; +namespace VuFind\Theme\Root\Helper; use Zend\View\Helper\AbstractHelper; /** diff --git a/themes/vufind/root/helpers/Truncate.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Truncate.php similarity index 100% rename from themes/vufind/root/helpers/Truncate.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/Truncate.php diff --git a/themes/vufind/root/helpers/UserList.php b/module/VuFind/src/VuFind/Theme/Root/Helper/UserList.php similarity index 100% rename from themes/vufind/root/helpers/UserList.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/UserList.php diff --git a/themes/vufind/root/helpers/VideoClips.php b/module/VuFind/src/VuFind/Theme/Root/Helper/VideoClips.php similarity index 100% rename from themes/vufind/root/helpers/VideoClips.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/VideoClips.php diff --git a/themes/vufind/jquerymobile/helpers/MobileMenu.php b/module/VuFind/src/VuFind/Theme/jQueryMobile/Helper/MobileMenu.php similarity index 100% rename from themes/vufind/jquerymobile/helpers/MobileMenu.php rename to module/VuFind/src/VuFind/Theme/jQueryMobile/Helper/MobileMenu.php diff --git a/themes/vufind/blueprint/theme.ini b/themes/vufind/blueprint/theme.ini index 1aabc8fbfcddda46c18ef96e13d75385ab8c455d..a99bb80295b08b4ee379fbd373f92d92383c4105 100644 --- a/themes/vufind/blueprint/theme.ini +++ b/themes/vufind/blueprint/theme.ini @@ -13,4 +13,6 @@ js[] = "jquery.validate.min.js" js[] = "jquery-ui/js/jquery-ui.js" js[] = "lightbox.js" js[] = "common.js" -favicon = "vufind-favicon.ico" \ No newline at end of file +favicon = "vufind-favicon.ico" + +helper_namespace = "VuFind\Theme\Blueprint\Helper" diff --git a/themes/vufind/jquerymobile/theme.ini b/themes/vufind/jquerymobile/theme.ini index de8a19ca5b8e8324229d72614e90716acab9eeb5..12e79b2ee5cc354704cc4028b99fdeabcb3194f3 100644 --- a/themes/vufind/jquerymobile/theme.ini +++ b/themes/vufind/jquerymobile/theme.ini @@ -9,4 +9,6 @@ js[] = "jquery.cookie.js" js[] = "cart_cookie.js" js[] = "cart.js" js[] = "scripts.js" -favicon = "vufind-favicon.ico" \ No newline at end of file +favicon = "vufind-favicon.ico" + +helper_namespace = "VuFind\Theme\jQueryMobile\Helper" \ No newline at end of file diff --git a/themes/vufind/root/theme.ini b/themes/vufind/root/theme.ini index 852dcf465fe43dd55495a7c6e74b79bb6b9570d0..9827ee2b7d8fc492cd3f397017a13404f10ad6d4 100644 --- a/themes/vufind/root/theme.ini +++ b/themes/vufind/root/theme.ini @@ -1,6 +1,6 @@ extends = false -helper_namespace = "VuFindThemes\Root\Helpers" +helper_namespace = "VuFind\Theme\Root\Helper" helpers_to_register[] = "HeadLink" helpers_to_register[] = "HeadScript" helpers_to_register[] = "HeadThemeResources"