Skip to content

Commit

Permalink
Fix return type and function name in KitodoAccessViewHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrycze-volk committed Oct 7, 2024
1 parent 614efdf commit 8933eab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Classes/ViewHelpers/KitodoAccessViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand All @@ -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 = [];

Expand All @@ -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)
Expand Down

0 comments on commit 8933eab

Please sign in to comment.