1, ]; } /** @inheritdoc */ protected function getSyntaxKeyword(): string { return 'directory'; } /** @inheritdoc */ protected function processPath(string $path): array { // Directory path (no glob/pattern) $path = Path::cleanPath($path, true); return ['path' => $path]; } /** @inheritdoc */ protected function doRender(string $format, \Doku_Renderer $renderer, array $pathData, array $params): bool { $pathInfo = $this->getPathInfoSafe($pathData['path'], $renderer); if ($pathInfo === false) { return true; } // Provide the current directory path so Output can render the "Open Location" link. $params['openlocation'] = $pathInfo['root'] . $pathInfo['local']; $crawler = $this->createCrawler($params); $items = $crawler->listDirectory( $pathInfo['root'], $pathInfo['local'], $params['titlefile'] ); if ($items == []) { $this->renderEmptyState($renderer, 'empty_files'); return true; } // Always render as table style $params['style'] = 'table'; $output = new Output($renderer, $pathInfo['root'], $pathInfo['web'], $items); $output->renderAsFlatTable($params); return true; } }