‪TYPO3CMS  10.4
FileCollectionRepository.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 
26 {
30  protected ‪$table = 'sys_file_collection';
31 
35  protected ‪$typeField = 'type';
36 
44  public function ‪findByUid($uid)
45  {
46  $object = parent::findByUid($uid);
47  if ($object === null) {
48  throw new ‪ResourceDoesNotExistException('Could not find row with uid "' . $uid . '" in table "' . $this->table . '"', 1314354066);
49  }
50  return $object;
51  }
52 
60  protected function ‪createDomainObject(array $record)
61  {
62  return $this->‪getFileFactory()->‪createCollectionObject($record);
63  }
64 
70  protected function ‪getFileFactory()
71  {
72  return GeneralUtility::makeInstance(ResourceFactory::class);
73  }
74 }
‪TYPO3\CMS\Core\Resource\FileCollectionRepository
Definition: FileCollectionRepository.php:26
‪TYPO3\CMS\Core\Resource\FileCollectionRepository\$typeField
‪string $typeField
Definition: FileCollectionRepository.php:33
‪TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection
Definition: AbstractFileCollection.php:27
‪TYPO3\CMS\Core\Resource\FileCollectionRepository\getFileFactory
‪ResourceFactory getFileFactory()
Definition: FileCollectionRepository.php:68
‪TYPO3\CMS\Core\Resource\FileCollectionRepository\createDomainObject
‪Collection AbstractFileCollection createDomainObject(array $record)
Definition: FileCollectionRepository.php:58
‪TYPO3\CMS\Core\Resource\FileCollectionRepository\$table
‪string $table
Definition: FileCollectionRepository.php:29
‪TYPO3\CMS\Core\Resource\ResourceFactory
Definition: ResourceFactory.php:41
‪TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException
Definition: ResourceDoesNotExistException.php:24
‪TYPO3\CMS\Core\Resource
Definition: generateMimeTypes.php:52
‪TYPO3\CMS\Core\Collection\RecordCollectionRepository
Definition: RecordCollectionRepository.php:28
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Core\Resource\FileCollectionRepository\findByUid
‪Collection AbstractFileCollection null findByUid($uid)
Definition: FileCollectionRepository.php:42
‪TYPO3\CMS\Core\Resource\ResourceFactory\createCollectionObject
‪Collection AbstractFileCollection createCollectionObject(array $collectionData)
Definition: ResourceFactory.php:338