From 8933eabac03373a3a8404491a03d9d8b42182b1d Mon Sep 17 00:00:00 2001 From: Beatrycze Volk Date: Mon, 7 Oct 2024 18:54:54 +0200 Subject: [PATCH] Fix return type and function name in `KitodoAccessViewHelper` --- Classes/ViewHelpers/KitodoAccessViewHelper.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Classes/ViewHelpers/KitodoAccessViewHelper.php b/Classes/ViewHelpers/KitodoAccessViewHelper.php index 76d6518..8c1205b 100644 --- a/Classes/ViewHelpers/KitodoAccessViewHelper.php +++ b/Classes/ViewHelpers/KitodoAccessViewHelper.php @@ -27,6 +27,7 @@ use Slub\DigasFeManagement\Domain\Model\User; use Slub\DigasFeManagement\Domain\Repository\UserRepository; +use Slub\SlubWebDigas\Domain\Model\KitodoDocument; use TYPO3\CMS\Core\Database\ConnectionPool; use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; use TYPO3\CMS\Extbase\Object\ObjectManager; @@ -113,7 +114,7 @@ public static function renderStatic(array $arguments, \Closure $renderChildrenCl */ $currentUser = $userRepository->findByUid($GLOBALS['TSFE']->fe_user->user['uid']); //get accessible documents of current fe_user - $accessIds = KitodoAccessViewHelper::getKitodoDocmentAccessIdsAsArray($currentUser->getKitodoDocumentAccess()); + $accessIds = KitodoAccessViewHelper::getKitodoDocumentAccessIdsAsArray($currentUser->getKitodoDocumentAccess()); return in_array($kitodoDocument['record_id'], $accessIds); } @@ -140,7 +141,7 @@ protected static function getSettings() { * @param ObjectStorage $kitodoDocumentAccess * @return array */ - protected static function getKitodoDocmentAccessIdsAsArray(ObjectStorage $kitodoDocumentAccess) : array + protected static function getKitodoDocumentAccessIdsAsArray(ObjectStorage $kitodoDocumentAccess) : array { $accessIds = []; @@ -157,7 +158,7 @@ protected static function getKitodoDocmentAccessIdsAsArray(ObjectStorage $kitodo * fetch dlf document by uid * * @param int $uid - * @return void + * @return KitodoDocument */ protected static function getDlfDocument(int $uid) { $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)