The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit ea4df2a7 authored by Robert Lange's avatar Robert Lange
Browse files

refs #21064 [fid] RecordTab and Serializer: add comments

parent c4b0109a
Branches
No related merge requests found
......@@ -20,7 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category VuFind
* @package RecordTabs
* @package RecordTab
* @author Demian Katz <demian.katz@villanova.edu>
* @author André Lahmann <lahmann@ub.uni-leipzig.de>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
......@@ -32,7 +32,7 @@ namespace fid\RecordTab;
* Staff view tab for AI records
*
* @category VuFind
* @package RecordTabs
* @package RecordTab
* @author Demian Katz <demian.katz@villanova.edu>
* @author Gregor Gawol <gawol@ub.uni-leipzig.de>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
......@@ -65,7 +65,11 @@ class Worldcat extends \VuFind\RecordTab\AbstractBase
*/
public function isActive()
{
if (!$this->getRecordDriver()->tryMethod('hasRecordPermission', [$this->accessPermission])) {
$hasRecordPermission = $this->getRecordDriver()->tryMethod(
'hasRecordPermission',
[$this->accessPermission]
);
if (!$hasRecordPermission) {
return false;
}
$oclc = $this->getRecordDriver()->tryMethod('getOCLC');
......
......@@ -2,6 +2,8 @@
/**
* 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,9 +17,15 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* @author Gregor Gawol <gawol@ub.uni-leipzig.de>
* @author Sebastian Kehr <kehr@ub.uni-leipzig.de>
* @license http://opensource.org/licenses/gpl-2.0.php GNU GPLv2
* Serializer for Order Requests to FIDIS API
* https://git.sc.uni-leipzig.de/ubl/finc/fid/fidis/-/blob/master/bundle/Entity/Order.php
*
* @category VuFind
* @package Serializer
* @author Gregor Gawol <gawol@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\Serializer;
......@@ -26,11 +34,33 @@ use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
/**
* Class OrderCreationRequestUserNormalizer
*
* Serializer for Order Requests to FIDIS API
* https://git.sc.uni-leipzig.de/ubl/finc/fid/fidis/-/blob/master/bundle/Entity/Order.php
*
* @category VuFind
* @package Serializer
* @author Gregor Gawol <gawol@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 OrderCreationRequestUserNormalizer implements
ContextAwareNormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
/**
* {@inheritdoc}
*
* @param mixed $data Order data
* @param null $format Format the normalization result will be encoded as
* @param array $context Context options for the normalizer
*
* @return bool true if Serializer supports normalization otherwise false
*/
public function supportsNormalization(
$data,
$format = null,
......@@ -41,9 +71,11 @@ class OrderCreationRequestUserNormalizer implements
}
/**
* @param mixed|User $object
* @param null $format
* @param array $context
* {@inheritdoc}
*
* @param mixed|User $object Object to normalize
* @param null $format Format the normalization result will be encoded as
* @param array $context Context options for the normalizer
*
* @return array|bool|float|int|string
*/
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment