Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Fix return type and function name in KitodoAccessViewHelper #42

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading