/** * @param string $filePath * @return array */ protected function getPreviewFromPath($filePath) { $mimeType = $this->mimeTypeDetector->detectPath($filePath); $preview = ['link' => $this->getPreviewLink($filePath, false), 'source' => $this->getPreviewPathFromMimeType($mimeType), 'isMimeTypeIcon' => true]; return $preview; }
/** * @param string $filePath * @param array $info * @return array */ protected function getPreviewFromPath($filePath, $info) { $mimeType = $this->mimeTypeDetector->detectPath($filePath); $preview = ['link' => $this->getPreviewLink($info['path'], $info['is_dir'], $info['view']), 'source' => $this->getPreviewPathFromMimeType($mimeType), 'isMimeTypeIcon' => true]; return $preview; }