[TASK] Change to named keys in EXT:seo when using generateMetaTags hook
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Property / TypeConverter / StaticFileCollectionConverter.php
1 <?php
2 declare(strict_types = 1);
3
4 namespace TYPO3\CMS\Extbase\Property\TypeConverter;
5
6 /*
7 * This file is part of the TYPO3 CMS project.
8 *
9 * It is free software; you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License, either version 2
11 * of the License, or any later version.
12 *
13 * For the full copyright and license information, please read the
14 * LICENSE.txt file that was distributed with this source code.
15 *
16 * The TYPO3 project - inspiring people to share!
17 */
18
19 /**
20 * Converter which transforms simple types to \TYPO3\CMS\Extbase\Domain\Model\FileCollection.
21 *
22 * @internal experimental! This class is experimental and subject to change!
23 */
24 class StaticFileCollectionConverter extends \TYPO3\CMS\Extbase\Property\TypeConverter\AbstractFileCollectionConverter
25 {
26 /**
27 * @var string[]
28 */
29 protected $sourceTypes = ['integer'];
30
31 /**
32 * @var string
33 */
34 protected $targetType = \TYPO3\CMS\Extbase\Domain\Model\StaticFileCollection::class;
35
36 /**
37 * @var string
38 */
39 protected $expectedObjectType = \TYPO3\CMS\Core\Resource\Collection\StaticFileCollection::class;
40
41 /**
42 * @param int $source
43 * @return \TYPO3\CMS\Core\Resource\Collection\StaticFileCollection
44 */
45 protected function getObject($source): \TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection
46 {
47 return $this->fileFactory->getCollectionObject($source);
48 }
49 }