Skip to content
Snippets Groups Projects
Commit 840a5535 authored by Samuli Sillanpää's avatar Samuli Sillanpää Committed by Robert Lange
Browse files

Refactor to get record loader via class method. (#1557)

parent df8feabb
No related merge requests found
......@@ -124,7 +124,7 @@ class HierarchyController extends AbstractBase
$id = $this->params()->fromQuery('id');
$source = $this->params()
->fromQuery('hierarchySource', DEFAULT_SEARCH_BACKEND);
$loader = $this->serviceLocator->get(\VuFind\Record\Loader::class);
$loader = $this->getRecordLoader();
try {
if ($recordDriver = $loader->load($id, $source)) {
$results = $recordDriver->getHierarchyDriver()->render(
......@@ -159,7 +159,7 @@ class HierarchyController extends AbstractBase
$id = $this->params()->fromQuery('id');
$source = $this->params()
->fromQuery('hierarchySource', DEFAULT_SEARCH_BACKEND);
$loader = $this->serviceLocator->get(\VuFind\Record\Loader::class);
$loader = $this->getRecordLoader();
try {
if ($recordDriver = $loader->load($id, $source)) {
$results = $recordDriver->getHierarchyDriver()
......@@ -191,7 +191,7 @@ class HierarchyController extends AbstractBase
$id = $this->params()->fromQuery('id');
$source = $this->params()
->fromQuery('hierarchySource', DEFAULT_SEARCH_BACKEND);
$loader = $this->serviceLocator->get(\VuFind\Record\Loader::class);
$loader = $this->getRecordLoader();
try {
$record = $loader->load($id, $source);
$result = $this->getViewRenderer()->record($record)
......
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