diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Record.php b/module/VuFind/src/VuFind/View/Helper/Root/Record.php index 9f1fc0c1b13..b77f5606650 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/Record.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/Record.php @@ -422,7 +422,7 @@ public function getCheckbox($idPrefix = '', $formAttr = false, $number = null) $context = compact('number') + [ 'id' => $this->getUniqueIdWithSourcePrefix(), 'checkboxElementId' => $this->getUniqueHtmlElementId($idPrefix), - 'prefix' => $idPrefix + 'prefix' => $idPrefix, ]; if ($formAttr) { $context['formAttr'] = $formAttr; @@ -720,11 +720,11 @@ protected function deduplicateLinks($links) * * @return string */ - public function getUniqueHtmlElementId($idPrefix = "") + public function getUniqueHtmlElementId($idPrefix = '') { return preg_replace( "/\s+/", - "_", + '_', ($idPrefix ? $idPrefix . '-' : '') . $this->getUniqueIdWithSourcePrefix() ); } @@ -740,6 +740,6 @@ public function getUniqueIdWithSourcePrefix() return "{$this->driver->tryMethod('getSourceIdentifier')}" . "|{$this->driver->tryMethod('getUniqueId')}"; } - throw new \Exception("No record driver found."); + throw new \Exception('No record driver found.'); } }