Skip to content
Snippets Groups Projects
Commit 9f091f67 authored by Dorian Merz's avatar Dorian Merz Committed by Robert Lange
Browse files

refs #16883 [finc] show hierarchy tree tab only if there actually is a hierarchy tree to show

* do not show tab for single-element trees
parent 3ce1e5cb
No related merge requests found
......@@ -51,17 +51,20 @@ class HierarchyTree extends \VuFind\RecordTab\HierarchyTree
else return 'hierarchy_tree';
}
/**
* {@inheritdoc}
* Returns different descriptions according to record type
* @return string
*/
/* public function isActive()
public function isActive()
{
return (
$this->getRecordDriver()->tryMethod('isSingleElementHierarchyRecord')
? false : parent::isActive()
);
$trees = $this->getTreeList();
if (empty($trees)) {
return false;
}
foreach ($trees as $key => $value) {
if ($key !== $this->driver->getUniqueID()) {
return true;
}
}
if ($this->driver->getChildRecordCount() > 0) {
return true;
}
return false;
}
*/
}
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