diff --git a/Classes/ViewHelpers/IndexTraversingViewHelper.php b/Classes/ViewHelpers/IndexTraversingViewHelper.php index 02de932e..00c2c99f 100644 --- a/Classes/ViewHelpers/IndexTraversingViewHelper.php +++ b/Classes/ViewHelpers/IndexTraversingViewHelper.php @@ -7,6 +7,7 @@ use HDNET\Calendarize\Domain\Model\Index; use HDNET\Calendarize\Domain\Repository\IndexRepository; use TYPO3\CMS\Extbase\Persistence\QueryInterface; +use TYPO3\CMS\Extbase\Persistence\QueryResultInterface; /** * Index traversing. @@ -47,7 +48,7 @@ public function initializeArguments(): void /** * Render method. */ - public function render(): array + public function render(): array|QueryResultInterface { return $this->indexRepository->findByTraversing( $this->arguments['index'], diff --git a/Classes/ViewHelpers/IndicesByObjectViewHelper.php b/Classes/ViewHelpers/IndicesByObjectViewHelper.php index a878fa04..34e82345 100644 --- a/Classes/ViewHelpers/IndicesByObjectViewHelper.php +++ b/Classes/ViewHelpers/IndicesByObjectViewHelper.php @@ -9,6 +9,7 @@ use HDNET\Calendarize\Register; use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; use TYPO3\CMS\Extbase\Persistence\QueryInterface; +use TYPO3\CMS\Extbase\Persistence\QueryResultInterface; /** * Indices by object. @@ -51,7 +52,7 @@ public function initializeArguments(): void /** * Render method. */ - public function render(): array + public function render(): array|QueryResultInterface { /** @var AbstractEntity $object */ $object = $this->arguments['object'];