diff --git a/module/VuFindTheme/Module.php b/module/VuFindTheme/Module.php index 6b6ce085d2c5a7b3060594ec71638b825eeb5302..97a9c1eb530403755a5c60efac41aad474894e4c 100644 --- a/module/VuFindTheme/Module.php +++ b/module/VuFindTheme/Module.php @@ -61,21 +61,16 @@ class Module */ public function getServiceConfig() { - // @codingStandardsIgnoreStart return array( 'factories' => array( - 'VuFindTheme\ThemeInfo' => function () { - return new \VuFindTheme\ThemeInfo( - realpath(__DIR__ . '/../../themes'), 'blueprint' - ); - } + 'VuFindTheme\ThemeInfo' => + array('VuFindTheme\Module', 'getThemeInfo'), ), 'invokables' => array( 'VuFindTheme\Mobile' => 'VuFindTheme\Mobile', 'VuFindTheme\ResourceContainer' => 'VuFindTheme\ResourceContainer', ), ); - // @codingStandardsIgnoreEnd } /** @@ -124,11 +119,12 @@ class Module } /** - * Perform initialization + * Factory function for ThemeInfo object. * - * @return void + * @return ThemeInfo */ - public function init() + public function getThemeInfo() { + return new ThemeInfo(realpath(__DIR__ . '/../../themes'), 'blueprint'); } }