‪TYPO3CMS  10.4
FileReference.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
21 
28 {
35  protected ‪$uidLocal;
36 
41  {
42  $this->originalResource = ‪$originalResource;
43  $this->uidLocal = (int)‪$originalResource->getOriginalFile()->getUid();
44  }
45 
49  public function ‪getOriginalResource()
50  {
51  if ($this->originalResource === null) {
53  $this->originalResource = GeneralUtility::makeInstance(ResourceFactory::class)->getFileReferenceObject(‪$uid);
54  }
55 
57  }
58 }
‪TYPO3\CMS\Extbase\Domain\Model\FileReference\setOriginalResource
‪setOriginalResource(ResourceInterface $originalResource)
Definition: FileReference.php:39
‪TYPO3\CMS\Extbase\Domain\Model\FileReference\getOriginalResource
‪TYPO3 CMS Core Resource FileReference getOriginalResource()
Definition: FileReference.php:48
‪TYPO3\CMS\Extbase\Domain\Model\AbstractFileFolder\$originalResource
‪TYPO3 CMS Core Resource ResourceInterface $originalResource
Definition: AbstractFileFolder.php:30
‪TYPO3\CMS\Extbase\Domain\Model\FileReference\$uidLocal
‪int $uidLocal
Definition: FileReference.php:34
‪TYPO3\CMS\Extbase\Domain\Model\AbstractFileFolder
Definition: AbstractFileFolder.php:27
‪TYPO3\CMS\Core\Resource\ResourceFactory
Definition: ResourceFactory.php:41
‪TYPO3\CMS\Extbase\Domain\Model\FileReference
Definition: FileReference.php:28
‪TYPO3\CMS\Extbase\Domain\Model
Definition: AbstractFileCollection.php:16
‪TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\$uid
‪int $uid
Definition: AbstractDomainObject.php:34
‪TYPO3\CMS\Core\Resource\ResourceInterface
Definition: ResourceInterface.php:22
‪TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\$_localizedUid
‪int $_localizedUid
Definition: AbstractDomainObject.php:38
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46