/**
  * Passes a file to the File Processing Services and returns the resulting ProcessedFile object.
  *
  * @param \TYPO3\CMS\Core\Resource\FileInterface $fileObject The file object
  * @param string $context
  * @param array $configuration
  *
  * @return \TYPO3\CMS\Core\Resource\ProcessedFile
  * @throws \InvalidArgumentException
  */
 public function processFile(\TYPO3\CMS\Core\Resource\FileInterface $fileObject, $context, array $configuration)
 {
     if ($fileObject->getStorage() !== $this) {
         throw new \InvalidArgumentException('Cannot process files of foreign storage', 1353401835);
     }
     $processedFile = $this->getFileProcessingService()->processFile($fileObject, $this, $context, $configuration);
     return $processedFile;
 }
 /**
  * @return string
  */
 public function getIdentifier()
 {
     return $this->resource->getStorage()->getUid() . ':' . $this->resource->getIdentifier();
 }
 /**
  * Retrieves Index record for a given $fileObject
  *
  * @param \TYPO3\CMS\Core\Resource\FileInterface $fileObject
  * @return array|boolean
  *
  * @internal only for use from FileRepository
  */
 public function findOneByFileObject(\TYPO3\CMS\Core\Resource\FileInterface $fileObject)
 {
     $storageUid = $fileObject->getStorage()->getUid();
     $identifierHash = $fileObject->getHashedIdentifier();
     return $this->findOneByStorageUidAndIdentifierHash($storageUid, $identifierHash);
 }
Exemple #4
0
 /**
  * Format the current link for HTML output
  *
  * @return string
  */
 public function formatCurrentUrl()
 {
     return $this->currentFile->getStorage()->getName() . ': ' . $this->currentFile->getIdentifier();
 }