getSharedStimulusResourceSpecification()->isSatisfiedBy($mediaResource)) { return; } $fs = $this->getFileSystem(); $cssPath = dirname($link) . DIRECTORY_SEPARATOR . StoreService::CSS_DIR_NAME; if (!$fs->has($cssPath)) { return; } $files = $fs->listContents($cssPath); if (!count($files)) { return; } $zip->addEmptyDir(self::CSS_ZIP_DIR_NAME); foreach ($files as $file) { $content = $fs->read($cssPath . DIRECTORY_SEPARATOR . $file['basename']); $zip->addFromString(self::CSS_ZIP_DIR_NAME . DIRECTORY_SEPARATOR . $file['basename'], $content); } } private function getFileSystem(): FilesystemInterface { return $this->getFileSystemService() ->getFileSystem($this->getFlySystemManagement()->getOption(FlySystemManagement::OPTION_FS)); } private function getFileSystemService(): FileSystemService { return $this->getServiceLocator()->get(FileSystemService::SERVICE_ID); } private function getFlySystemManagement(): FlySystemManagement { return $this->getServiceLocator()->get(FlySystemManagement::SERVICE_ID); } private function getSharedStimulusResourceSpecification(): SharedStimulusResourceSpecification { return $this->getServiceLocator()->get(SharedStimulusResourceSpecification::class); } }