Skip to content
Snippets Groups Projects
Commit 51d42a85 authored by Demian Katz's avatar Demian Katz
Browse files

More configuration decoupling.

parent 2092b703
No related merge requests found
......@@ -63,10 +63,12 @@ abstract class AbstractSyndetics extends AbstractHelper
/**
* Constructor
*
* @param \Zend\Config\Config $config VuFind configuration
*/
public function __construct()
public function __construct(\Zend\Config\Config $config)
{
$this->config = \VuFind\Config\Reader::getConfig();
$this->config = $config;
}
/**
......
......@@ -14,6 +14,11 @@ return array(
$sm->getServiceLocator()->get('VuFind\AuthManager')
);
},
'authornotes' => function ($sm) {
return new \VuFind\View\Helper\Root\AuthorNotes(
$sm->getServiceLocator()->get('VuFind\Config')->get('config')
);
},
'cart' => function ($sm) {
return new \VuFind\View\Helper\Root\Cart(
$sm->getServiceLocator()->get('VuFind\Cart')
......@@ -34,6 +39,11 @@ return array(
$sm->getServiceLocator()->get('VuFind\Translator')
);
},
'excerpt' => function ($sm) {
return new \VuFind\View\Helper\Root\Excerpt(
$sm->getServiceLocator()->get('VuFind\Config')->get('config')
);
},
'export' => function ($sm) {
return new \VuFind\View\Helper\Root\Export(
$sm->getServiceLocator()->get('VuFind\Export')
......@@ -71,6 +81,11 @@ return array(
$sm->getServiceLocator()->get('VuFind\RecordRouter')
);
},
'reviews' => function ($sm) {
return new \VuFind\View\Helper\Root\Reviews(
$sm->getServiceLocator()->get('VuFind\Config')->get('config')
);
},
'searchoptions' => function ($sm) {
return new VuFind\View\Helper\Root\SearchOptions(
$sm->getServiceLocator()->get('SearchManager')
......@@ -88,14 +103,17 @@ return array(
isset($config->Site->email) ? $config->Site->email : ''
);
},
'videoclips' => function ($sm) {
return new \VuFind\View\Helper\Root\VideoClips(
$sm->getServiceLocator()->get('VuFind\Config')->get('config')
);
},
),
'invokables' => array(
'addellipsis' => 'VuFind\View\Helper\Root\AddEllipsis',
'authornotes' => 'VuFind\View\Helper\Root\AuthorNotes',
'browse' => 'VuFind\View\Helper\Root\Browse',
'context' => 'VuFind\View\Helper\Root\Context',
'currentpath' => 'VuFind\View\Helper\Root\CurrentPath',
'excerpt' => 'VuFind\View\Helper\Root\Excerpt',
'getlastsearchlink' => 'VuFind\View\Helper\Root\GetLastSearchLink',
'highlight' => 'VuFind\View\Helper\Root\Highlight',
'jqueryvalidation' => 'VuFind\View\Helper\Root\JqueryValidation',
......@@ -104,7 +122,6 @@ return array(
'related' => 'VuFind\View\Helper\Root\Related',
'renderarray' => 'VuFind\View\Helper\Root\RenderArray',
'resultfeed' => 'VuFind\View\Helper\Root\ResultFeed',
'reviews' => 'VuFind\View\Helper\Root\Reviews',
'safemoneyformat' => 'VuFind\View\Helper\Root\SafeMoneyFormat',
'sortfacetlist' => 'VuFind\View\Helper\Root\SortFacetList',
'summon' => 'VuFind\View\Helper\Root\Summon',
......@@ -112,7 +129,6 @@ return array(
'translate' => 'VuFind\View\Helper\Root\Translate',
'truncate' => 'VuFind\View\Helper\Root\Truncate',
'userlist' => 'VuFind\View\Helper\Root\UserList',
'videoclips' => 'VuFind\View\Helper\Root\VideoClips',
)
),
);
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment