fileSystem = $fileSystem; $this->flyweightFactory = $flyweightFactory; } /** * {@inheritdoc} * * If theme or file directory for theme static content does not exist then return an empty array. */ public function getList($code, $area = DesignInterface::DEFAULT_AREA) { try { $theme = $this->flyweightFactory->create($code, $area); $reader = $this->fileSystem->getDirectoryRead(DirectoryList::STATIC_VIEW); $dirs = $reader->read($theme->getFullPath()); } catch (\Exception $e) { return []; } return array_map('basename', $dirs); } }