getAsset(); $search->setChildrenLimit($this->getPaginationLimit()); $mediaSource = $asset->getMediaSource(); if ($mediaSource instanceof AccessControlEnablerInterface) { $mediaSource->enableAccessControl(); } $data = $mediaSource->getDirectories($search); foreach ($data['children'] as &$child) { if (isset($child['parent'])) { $child['url'] = tao_helpers_Uri::url( 'files', 'ItemContent', 'taoItems', [ 'uri' => $search->getItemUri(), 'lang' => $search->getItemLang(), '1' => $child['parent'] ] ); unset($child['parent']); } } return $data; } private function getPaginationLimit(): int { return (int)$this->getOption(self::OPTION_PAGINATION_LIMIT, self::DEFAULT_PAGINATION_LIMIT); } }