/** * Get the path for a file version * * @param Version $file_version * @param ThumbnailVersion $thumbnail * @return null|string */ public function getPath(Version $file_version, ThumbnailVersion $thumbnail) { /** @var File $file */ $file = $file_version->getFile(); $file_id = $file->getFileID(); $storage_location = $file->getFileStorageLocationObject(); $configuration = $storage_location->getConfigurationObject(); $version_id = $file_version->getFileVersionID(); $storage_location_id = $storage_location->getID(); $thumbnail_handle = $thumbnail->getHandle(); $path = $this->getStoredPath($file_id, $version_id, $storage_location_id, $thumbnail_handle); if ($path) { if ($configuration instanceof DeferredConfigurationInterface) { return $configuration->getPublicURLToFile($path); } return $path; } elseif ($path = $this->determinePath($file_version, $thumbnail, $storage_location, $configuration)) { $this->storePath($path, $file_id, $version_id, $storage_location_id, $thumbnail_handle); if ($configuration instanceof DeferredConfigurationInterface) { return $configuration->getPublicURLToFile($path); } return $path; } }
/** * {@inheritDoc} */ public function getFileVersionID() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getFileVersionID', array()); return parent::getFileVersionID(); }
public function getFileVersionID() { return parent::getFileVersionID(); }