diff --git a/module/fid/src/Helper/FormLabel.php b/module/fid/src/Helper/FormLabel.php index c6312fd11505a20b61985cc028d0f32fff2207d0..ea37df6067223e05d5130718cda4af904b83a247 100644 --- a/module/fid/src/Helper/FormLabel.php +++ b/module/fid/src/Helper/FormLabel.php @@ -1,7 +1,11 @@ <?php /** + * Zend Form Label View Helper + * * Copyright (C) 2019 Leipzig University Library * + * PHP Version 7 + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. @@ -15,17 +19,38 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * @author Robert Lange <lange@ub.uni-leipzig.de> - * @author Sebastian Kehr <kehr@ub.uni-leipzig.de> - * @license http://opensource.org/licenses/gpl-2.0.php GNU GPLv2 + * @category VuFind + * @package View_Helpers + * @author Robert Lange <lange@ub.uni-leipzig.de> + * @author Sebastian Kehr <kehr@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU GPLv2 + * @link https://vufind.org/wiki/development Wiki */ namespace fid\Helper; use Zend\Form\Element; +use Zend\Form\ElementInterface; use Zend\Form\View\Helper\FormLabel as Base; +/** + * Improved Zend Form Label View Helper by adding attributes + * + * @category VuFind + * @package View_Helpers + * @author Robert Lange <lange@ub.uni-leipzig.de> + * @author Sebastian Kehr <kehr@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU GPLv2 + * @link https://vufind.org/wiki/development Wiki + */ class FormLabel extends Base { + /** + * {@inheritdoc} + * + * @param null|array|ElementInterface $element Form element + * + * @return string + */ public function openTag($element = null) { if ($element instanceof Element) { diff --git a/module/fid/src/Helper/SearchTabs.php b/module/fid/src/Helper/SearchTabs.php index 5ee9dc96cb426982ccebe580ca199db1746519f5..f7d5deccd042345b5282570612e16a5b6744ca16 100644 --- a/module/fid/src/Helper/SearchTabs.php +++ b/module/fid/src/Helper/SearchTabs.php @@ -6,6 +6,7 @@ * * Copyright (C) Villanova University 2010. * Copyright (C) The National Library of Finland 2015-2016. + * Copyright (C) 2021 Leipzig University Library * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, @@ -52,7 +53,8 @@ class SearchTabs extends \VuFind\View\Helper\Root\SearchTabs */ protected function createBasicTab($id, $class, $label, $newUrl, $permissionName) { - $retval = parent::createBasicTab($id, $class, $label, $newUrl, $permissionName); + $retval + = parent::createBasicTab($id, $class, $label, $newUrl, $permissionName); $retval['hiddenFilters'] = $this->helper->getTabFilterConfig()[$id] ?? null; return $retval; @@ -90,7 +92,8 @@ class SearchTabs extends \VuFind\View\Helper\Root\SearchTabs */ protected function createHomeTab($id, $class, $label, $filters, $permissionName) { - $retval = parent::createHomeTab($id, $class, $label, $filters, $permissionName); + $retval + = parent::createHomeTab($id, $class, $label, $filters, $permissionName); $retval['hiddenFilters'] = $this->helper->getTabFilterConfig()[$id] ?? null; return $retval; diff --git a/module/fid/src/Helper/TranslatorDelegator.php b/module/fid/src/Helper/TranslatorDelegator.php index 66735db524edf8612343691f6ae03e662331618a..d63177de76504e54937da876bad70db9afc6b66a 100644 --- a/module/fid/src/Helper/TranslatorDelegator.php +++ b/module/fid/src/Helper/TranslatorDelegator.php @@ -1,7 +1,11 @@ <?php /** + * Translator Delegator + * * Copyright (C) 2019 Leipzig University Library * + * PHP version 7 + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. @@ -15,16 +19,37 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * @author Robert Lange <lange@ub.uni-leipzig.de> - * @license http://opensource.org/licenses/gpl-2.0.php GNU GPLv2 + * @category VuFind + * @package View_Helpers + * @author Robert Lange <lange@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki */ namespace fid\Helper; use Psr\Container\ContainerInterface; use Zend\I18n\Translator\Resources; +/** + * Translator Delegator + * + * @category VuFind + * @package View_Helpers + * @author Robert Lange <lange@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + */ class TranslatorDelegator { + /** + * Invoke method for creating translator object. + * + * @param ContainerInterface $container Container + * @param $name Class name + * @param callable $callback Callback function + * + * @return false|mixed + */ public function __invoke( ContainerInterface $container, $name,