/** * Returns the data for the given lazy object storage * @param \TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy $proxy * @param string $propertyKey * @param \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $model * @return array<mixed> */ public function getModelDataFromLazyLoadingProxy($proxy, $propertyKey, $model) { $returnData = array(); /* * Get the first level of nested objects and all built in TYPO3 * categories */ if ($this->currentModelDataDepth < 1 && $model instanceof \TYPO3\CMS\Extbase\Domain\Model\Category) { $this->currentModelDataDepth++; $returnData = $this->getModelData($proxy->_loadRealInstance()); $this->currentModelDataDepth--; } return $returnData; }