/**
  * Create new fileReference for later use
  * @param  integer $fileReferenceUid
  * @param  \TYPO3\CMS\Core\Resource\FileReference $fileUid
  * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference
  */
 protected function updateFileReference($fileReferenceUid, \TYPO3\CMS\Core\Resource\FileReference $falFileRefence)
 {
     $fileReference = $this->persistenceManager->getObjectByIdentifier($fileReferenceUid, 'TYPO3\\CMS\\Extbase\\Domain\\Model\\FileReference', FALSE);
     // Generate Core FileReference
     $fileReference->setOriginalResource($falFileRefence);
     // Persist
     $this->fileReferenceRepository->update($fileReference);
     return $fileReference;
 }
 /**
  * @param CoreFileReference $coreFileReference
  * @param int $resourcePointer
  * @return ExtbaseFileReference
  */
 protected function createFileReferenceFromFalFileReferenceObject(CoreFileReference $coreFileReference, $resourcePointer = null)
 {
     if ($resourcePointer === null) {
         /** @var $extbaseFileReference ExtbaseFileReference */
         $extbaseFileReference = $this->objectManager->get(ExtbaseFileReference::class);
     } else {
         $extbaseFileReference = $this->persistenceManager->getObjectByIdentifier($resourcePointer, ExtbaseFileReference::class, false);
     }
     $extbaseFileReference->setOriginalResource($coreFileReference);
     return $extbaseFileReference;
 }
 /**
  * @param FalFileReference $falFileReference
  * @param int $resourcePointer
  * @return \Visol\Easyvote\Domain\Model\FileReference
  */
 protected function createFileReferenceFromFalFileReferenceObject(FalFileReference $falFileReference, $resourcePointer = null)
 {
     if ($resourcePointer === null) {
         /** @var $fileReference \Visol\Easyvote\Domain\Model\FileReference */
         $fileReference = $this->objectManager->get('Visol\\Easyvote\\Domain\\Model\\FileReference');
     } else {
         $fileReference = $this->persistenceManager->getObjectByIdentifier($resourcePointer, 'Visol\\Easyvote\\Domain\\Model\\FileReference', false);
     }
     $fileReference->setOriginalResource($falFileReference);
     $fileReference->_setProperty('_languageUid', -1);
     return $fileReference;
 }
 /**
  * @param FalFileReference $falFileReference
  * @param int $resourcePointer
  * @return \Bureauoberhoff\H5upldr\Domain\Model\FileReference
  */
 protected function createFileReferenceFromFalFileReferenceObject(FalFileReference $falFileReference, $resourcePointer = NULL)
 {
     if ($resourcePointer === NULL) {
         /** @var $fileReference \Bureauoberhoff\H5upldr\Domain\Model\FileReference */
         $fileReference = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Domain\\Model\\FileReference');
     } else {
         $fileReference = $this->persistenceManager->getObjectByIdentifier($resourcePointer, 'TYPO3\\CMS\\Extbase\\Domain\\Model\\FileReference', FALSE);
     }
     $fileReference->setOriginalResource($falFileReference);
     return $fileReference;
 }
 /**
  * @param FalFileReference $falFileReference
  * @param int $resourcePointer
  * @return \Tx_News_Domain_Model_FileReference
  */
 protected function createFileReferenceFromFalFileReferenceObject(FalFileReference $falFileReference, $resourcePointer = NULL)
 {
     if ($resourcePointer === NULL) {
         /** @var $fileReference \Tx_News_Domain_Model_FileReference */
         $fileReference = $this->objectManager->get('Tx_News_Domain_Model_FileReference');
     } else {
         $fileReference = $this->persistenceManager->getObjectByIdentifier($resourcePointer, 'Tx_News_Domain_Model_FileReference', FALSE);
     }
     $fileReference->setOriginalResource($falFileReference);
     $fileReference->setFileUid($falFileReference->getOriginalFile()->getUid());
     $fileReference->setShowinpreview($falFileReference->getProperty('showinpreview'));
     return $fileReference;
 }