diff --git a/module/Olcs/src/Controller/Factory/Search/SearchControllerFactory.php b/module/Olcs/src/Controller/Factory/Search/SearchControllerFactory.php index 8921882eb..e394dc3e9 100644 --- a/module/Olcs/src/Controller/Factory/Search/SearchControllerFactory.php +++ b/module/Olcs/src/Controller/Factory/Search/SearchControllerFactory.php @@ -6,10 +6,10 @@ use Common\Service\Helper\TranslationHelperService; use Common\Service\Script\ScriptFactory; use Dvsa\Olcs\Utils\Translation\NiTextTranslation; -use Interop\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use Olcs\Controller\Search\SearchController; use LmcRbacMvc\Service\AuthorizationService; +use Psr\Container\ContainerInterface; class SearchControllerFactory implements FactoryInterface { diff --git a/module/Olcs/src/Form/Element/SearchDateRangeFieldsetFactory.php b/module/Olcs/src/Form/Element/SearchDateRangeFieldsetFactory.php index afdfb8f5c..474ee9c88 100644 --- a/module/Olcs/src/Form/Element/SearchDateRangeFieldsetFactory.php +++ b/module/Olcs/src/Form/Element/SearchDateRangeFieldsetFactory.php @@ -2,19 +2,12 @@ namespace Olcs\Form\Element; -use Interop\Container\ContainerInterface; use Common\Service\Data\Search\Search; use Laminas\ServiceManager\Factory\FactoryInterface; +use Psr\Container\ContainerInterface; class SearchDateRangeFieldsetFactory implements FactoryInterface { - protected $options; - - public function __construct($options) - { - $this->options = $options; - } - /** * @param ContainerInterface $container * @param $requestedName @@ -25,7 +18,7 @@ public function __construct($options) */ public function __invoke(ContainerInterface $container, $requestedName, array $options = null) : SearchDateRangeFieldset { - $fs = new SearchDateRangeFieldset($this->options['name'], $this->options); + $fs = new SearchDateRangeFieldset($options['name'], $options); $fs->setSearchService($container->get('DataServiceManager')->get(Search::class)); return $fs; } diff --git a/module/Olcs/src/Form/Element/SearchFilterFieldsetFactory.php b/module/Olcs/src/Form/Element/SearchFilterFieldsetFactory.php index 4c82db7b1..6259d0d3d 100644 --- a/module/Olcs/src/Form/Element/SearchFilterFieldsetFactory.php +++ b/module/Olcs/src/Form/Element/SearchFilterFieldsetFactory.php @@ -2,19 +2,12 @@ namespace Olcs\Form\Element; -use Interop\Container\ContainerInterface; use Common\Service\Data\Search\Search; use Laminas\ServiceManager\Factory\FactoryInterface; +use Psr\Container\ContainerInterface; class SearchFilterFieldsetFactory implements FactoryInterface { - protected $options; - - public function __construct($options) - { - $this->options = $options; - } - /** * @param ContainerInterface $container * @param $requestedName @@ -25,7 +18,7 @@ public function __construct($options) */ public function __invoke(ContainerInterface $container, $requestedName, array $options = null) : SearchFilterFieldset { - $fs = new SearchFilterFieldset($this->options['name'], $this->options); + $fs = new SearchFilterFieldset($options['name'], $options); $fs->setSearchService($container->get('DataServiceManager')->get(Search::class)); return $fs; diff --git a/module/Olcs/src/Form/Element/SearchOrderFieldsetFactory.php b/module/Olcs/src/Form/Element/SearchOrderFieldsetFactory.php index 98149f2cb..e0f034659 100644 --- a/module/Olcs/src/Form/Element/SearchOrderFieldsetFactory.php +++ b/module/Olcs/src/Form/Element/SearchOrderFieldsetFactory.php @@ -2,19 +2,12 @@ namespace Olcs\Form\Element; -use Interop\Container\ContainerInterface; use Common\Service\Data\Search\Search; use Laminas\ServiceManager\Factory\FactoryInterface; +use Psr\Container\ContainerInterface; class SearchOrderFieldsetFactory implements FactoryInterface { - protected $options; - - public function __construct($options) - { - $this->options = $options; - } - /** * @param ContainerInterface $container * @param $requestedName @@ -25,7 +18,7 @@ public function __construct($options) */ public function __invoke(ContainerInterface $container, $requestedName, array $options = null) : SearchOrderFieldset { - $fs = new SearchOrderFieldset($this->options['name'], $this->options); + $fs = new SearchOrderFieldset($options['name'], $options); $fs->setSearchService($container->get('DataServiceManager')->get(Search::class)); return $fs; } diff --git a/module/Olcs/src/Form/Model/Form/SimpleSearch.php b/module/Olcs/src/Form/Model/Form/SimpleSearch.php index b7917ecd2..3d1b73cb2 100644 --- a/module/Olcs/src/Form/Model/Form/SimpleSearch.php +++ b/module/Olcs/src/Form/Model/Form/SimpleSearch.php @@ -7,7 +7,7 @@ /** * @Form\Name("simple-search") * @Form\Attributes({"method":"post", "action":"", "role":"search"}) - * @Form\Hydrator("Laminas\Stdlib\Hydrator\ArraySerializable") + * @Form\Hydrator("Laminas\Hydrator\ArraySerializableHydrator") */ class SimpleSearch { diff --git a/module/Olcs/src/Form/Model/Form/TransportManagerApplicationResend.php b/module/Olcs/src/Form/Model/Form/TransportManagerApplicationResend.php index f48cddaab..96a62904f 100644 --- a/module/Olcs/src/Form/Model/Form/TransportManagerApplicationResend.php +++ b/module/Olcs/src/Form/Model/Form/TransportManagerApplicationResend.php @@ -7,7 +7,7 @@ /** * @Form\Name("transport-manager-application-resend") * @Form\Attributes({"method":"post", "action":""}) - * @Form\Hydrator("Laminas\Stdlib\Hydrator\ArraySerializable") + * @Form\Hydrator("Laminas\Hydrator\ArraySerializableHydrator") */ class TransportManagerApplicationResend { diff --git a/module/Olcs/view/layouts/main-search-results.phtml b/module/Olcs/view/layouts/main-search-results.phtml index 7a23088d5..c59748d1d 100644 --- a/module/Olcs/view/layouts/main-search-results.phtml +++ b/module/Olcs/view/layouts/main-search-results.phtml @@ -5,16 +5,12 @@ if(!empty($this->results)) { $results = $this->results; } - -/** @var \Common\Service\Helper\TranslationHelperService $translationHlp */ -$translationHlp = $this->getHelperPluginManager()->get('Helper\Translation'); - echo $this->partial( 'partials/page-header-simple', [ 'pageTitle' => $this->translate('search.result.title.' . $this->index), 'pageHeaderText' => - '

' . $translationHlp->translateReplace('search.result.subtitle.' . $this->index, [$count]) . '

' . + '

' . $this->translateReplace('search.result.subtitle.' . $this->index, [$count]) . '

' . ( $this->index === 'publication' ? '

' . $this->translate('search.result.subtitle.publication.download') .'

' diff --git a/module/Olcs/view/olcs/user-forgot-username/check-email.phtml b/module/Olcs/view/olcs/user-forgot-username/check-email.phtml index a88b92e7d..3aa5e7876 100644 --- a/module/Olcs/view/olcs/user-forgot-username/check-email.phtml +++ b/module/Olcs/view/olcs/user-forgot-username/check-email.phtml @@ -2,18 +2,14 @@

translate('user-forgot-username.page.check-email.title'); ?>

- getHelperPluginManager() - ->get('Helper\Translation') - ->translateReplace('user-forgot-username.page.check-email.guidance', [$this->emailAddress]); ?> + translateReplace('user-forgot-username.page.check-email.guidance', [$this->emailAddress]); ?>

- getHelperPluginManager() - ->get('Helper\Translation') - ->translateReplace( + translateReplace( 'user-forgot-username.page.check-email.content', [ $this->getHelperPluginManager()->get('Helper\Url')->fromRoute('auth/login/GET') diff --git a/module/Olcs/view/olcs/user-registration/check-email.phtml b/module/Olcs/view/olcs/user-registration/check-email.phtml index 9cf7ada86..8ed3c11ea 100644 --- a/module/Olcs/view/olcs/user-registration/check-email.phtml +++ b/module/Olcs/view/olcs/user-registration/check-email.phtml @@ -1,6 +1,4 @@ getHelperPluginManager()->get('Helper\Translation'); echo $this->partial( 'partials/page-header-simple', @@ -8,7 +6,7 @@ echo $this->partial( 'pageTitle' => $this->pageTitle(), 'pageHeaderText' => '

' . - $translationHlp->translateReplace( + $this->translateReplace( 'user-registration.page.check-email.guidance', [$this->emailAddress] ) . '

', @@ -18,13 +16,11 @@ echo $this->partial( ?>
- +

- getHelperPluginManager() - ->get('Helper\Translation') - ->translateReplace( + translateReplace( 'user-registration.page.check-email.content', [ $this->getHelperPluginManager()->get('Helper\Url')->fromRoute('auth/login/GET') diff --git a/module/Olcs/view/pages/fees/late.phtml b/module/Olcs/view/pages/fees/late.phtml index 4b5ec880f..a77fbf40f 100644 --- a/module/Olcs/view/pages/fees/late.phtml +++ b/module/Olcs/view/pages/fees/late.phtml @@ -13,8 +13,6 @@ echo $this->partial( ] ); -/** @var \Common\Service\Helper\TranslationHelperService $translator */ -$translator = $this->getHelperPluginManager()->get('Helper\Translation'); ?> @@ -22,11 +20,11 @@ $translator = $this->getHelperPluginManager()->get('Helper\Translation');

- translateReplace( + translateReplace( 'markup-late-fee', [$this->escapeHtml($licenceExpiryDate)] ); ?>
-
\ No newline at end of file +
diff --git a/module/Olcs/view/search/bus-browse-results.phtml b/module/Olcs/view/search/bus-browse-results.phtml index d7323115e..9a69a3692 100644 --- a/module/Olcs/view/search/bus-browse-results.phtml +++ b/module/Olcs/view/search/bus-browse-results.phtml @@ -2,15 +2,12 @@ $count = $this->results->getTotal(); $results = $this->results; -/** @var \Common\Service\Helper\TranslationHelperService $translationHlp */ -$translationHlp = $this->getHelperPluginManager()->get('Helper\Translation'); - echo $this->partial( 'partials/page-header-simple', [ 'pageTitle' => $this->translate('selfserve.search.busreg.browse.result.title'), 'pageHeaderText' => - '

' . $translationHlp->translateReplace('selfserve.search.busreg.browse.result.subtitle', [$count]) . '

', + '

' . $this->translateReplace('selfserve.search.busreg.browse.result.subtitle', [$count]) . '

', 'pageHeaderTextEscape' => false, 'backUrl' => [ 'url' => $this->url($this->backRoute),