diff --git a/module/fid/src/View/Helper/Root/GetIt.php b/module/fid/src/View/Helper/Root/GetIt.php index 5c7e2f870abca0fb961db8d3107eff6113700299..cf714571d103489d220399d7a65ab7e72cb816a1 100644 --- a/module/fid/src/View/Helper/Root/GetIt.php +++ b/module/fid/src/View/Helper/Root/GetIt.php @@ -65,6 +65,7 @@ class GetIt extends AbstractHelper protected $format; protected $facetAvail; protected $multipart; + protected $isCollection; protected $institution; protected $megacollection; protected $collection; @@ -91,7 +92,8 @@ class GetIt extends AbstractHelper $this->sid = $this->driver->tryMethod('getSourceID'); $this->format = $this->driver->tryMethod('getFormats'); $this->facetAvail = $this->driver->tryMethod('getFacetAvail'); - $this->multipart = $this->driver->tryMethod('getMultiPart'); + //$this->multipart = $this->driver->tryMethod('isMultiPartSet'); + $this->isCollection = $this->driver->tryMethod('hasChildren'); $this->institution = $this->driver->tryMethod('getInstitutions'); $this->megacollection = $this->driver->tryMethod('getMegaCollection'); $this->collection = $this->driver->tryMethod('getCollection'); @@ -255,8 +257,8 @@ class GetIt extends AbstractHelper return $this->translate('getit_text_13'); } } - if (preg_grep($this->_getNonSourceIds('source_idsV8_4'), [$this->multipart])) { - return $this->translate('getit_text_11'); + if ($this->isCollection) { + return $this->translate('getit_text_11',['%%hierarchy_tree%%' => $this->translate('hierarchy_tree')]); } if (preg_grep($this->_getNonSourceIds('source_idsV8_7'), $this->megacollection) ) { @@ -296,8 +298,8 @@ class GetIt extends AbstractHelper return $this->translate('getit_text_15'); } } - } elseif (preg_grep($this->_getNonSourceIds('source_idsV8_4'), [$this->multipart])) { - return $this->translate('getit_text_11'); + } elseif ($this->isCollection) { + return $this->translate('getit_text_11',['%%hierarchy_tree%%' => $this->translate('hierarchy_tree')]); } elseif (in_array('Local', $this->facetAvail) && preg_grep($this->_getNonSourceIds('source_idsV8_2'), $this->format) ) { @@ -352,7 +354,7 @@ class GetIt extends AbstractHelper if (in_array($this->sid, $this->_getSourceIds('source_idsV9')) && preg_grep($this->_getNonSourceIds('source_idsV8_1'), $this->format) && !in_array($this->_getNonSourceIds('source_idsV8_9'), $this->institution) - && !preg_grep($this->_getNonSourceIds('source_idsV8_4'), [$this->multipart]) + && !$this->isCollection && !preg_grep($this->_getNonSourceIds('source_idsV8_8'), $this->collection) ) { return true; @@ -368,7 +370,7 @@ class GetIt extends AbstractHelper if (!in_array('Free', $this->facetAvail) && in_array($this->sid, $this->_getSourceIds('source_idsV9')) && preg_grep($this->_getNonSourceIds('source_idsV8_1'), $this->format) - && !preg_grep($this->_getNonSourceIds('source_idsV8_4'), [$this->multipart]) + && !$this->isCollection && !preg_grep($this->_getNonSourceIds('source_idsV8_8'), $this->collection) ) { return true;