From ddd7929f54d5e8dec9afab275c6594cce624df77 Mon Sep 17 00:00:00 2001 From: Alexander Purr <purr@ub.uni-leipzig.de> Date: Wed, 4 Dec 2019 14:41:15 +0100 Subject: [PATCH] refs #16534 [fid_adlr] add recordController for using record citation as order label --- module/fid_adlr/config/module.config.php | 16 ++++++++-- .../src/Controller/RecordController.php | 30 +++++++++++++++++++ 2 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 module/fid_adlr/src/Controller/RecordController.php diff --git a/module/fid_adlr/config/module.config.php b/module/fid_adlr/config/module.config.php index 37b659c774d..7449f29e477 100644 --- a/module/fid_adlr/config/module.config.php +++ b/module/fid_adlr/config/module.config.php @@ -20,11 +20,14 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU GPLv2 */ +use fid\Controller\RecordControllerDelegatorFactory; +use fid\FormModel\PasswordChangeModel; +use fid_adlr\Controller\FeedbackController; use fid_adlr\Controller\MyResearchController; use fid_adlr\Controller\MyResearchControllerFactory; +use fid_adlr\Controller\RecordController; use fid_adlr\Helper\Rss; -use fid_adlr\Controller\FeedbackController; -use fid\FormModel\PasswordChangeModel; +use VuFind\Controller\AbstractBaseWithConfigFactory; use Zend\Router\Http\Regex; use Zend\ServiceManager\Factory\InvokableFactory; @@ -39,11 +42,18 @@ $config = [ 'factories' => [ MyResearchController::class => MyResearchControllerFactory::class, FeedbackController::class => 'VuFind\Controller\AbstractBaseFactory', + RecordController::class => AbstractBaseWithConfigFactory::class, ], 'aliases' => [ 'my-research' => MyResearchController::class, 'feedback' => FeedbackController::class, - 'Feedback' => FeedbackController::class + 'Feedback' => FeedbackController::class, + \VuFind\Controller\RecordController::class => RecordController::class, + ], + 'delegators' => [ + RecordController::class => [ + RecordControllerDelegatorFactory::class, + ], ], ], 'view_helpers' => [ diff --git a/module/fid_adlr/src/Controller/RecordController.php b/module/fid_adlr/src/Controller/RecordController.php new file mode 100644 index 00000000000..7ba83d51d1c --- /dev/null +++ b/module/fid_adlr/src/Controller/RecordController.php @@ -0,0 +1,30 @@ +<?php +/** + * Copyright (C) 2019 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 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * @author Alexander Purr <purr@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU GPLv2 + */ + +namespace fid_adlr\Controller; + +class RecordController extends \fid\Controller\RecordController +{ + public function getOrderLabel($driver) + { + return $this->getRecordCitation($driver); + } +} -- GitLab