[TYPO3-dev] Use FAL in own extension, StorageRepository object not working

Thomas Kieslich thomas.kieslich at gmail.com
Tue Dec 4 14:20:49 CET 2012


Hi Klaus
I use it in a New Extension.
The TCA is like Media in Pages and the Controller Part is this.

$fileRepository = 
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\FileRepository');
		$fileObjects = $fileRepository->findByRelation('tt_content', 
'tkcontent.fe2.content02.images', $this->cObj->data['uid']);
		
		$files = array();
		foreach ($fileObjects as $key => $value) {
			$files[$key]['reference'] = $value->getReferenceProperties();
//			$files[$key]['original'] = $value->getOriginalFile()->getProperties();
		}

I´t is a first Draft, but it work.

Regards, Thomas

Am 30.11.2012 21:08, schrieb Philipp Gampe:
> Hi Klaus,
>
> Klaus Hinum wrote:
>
>> Do I have to check if the FAL was initialized first. I cant find a good
>> tutorial. The one in docs.typo3.org doesnt work at all (outdated?) and
>> the snipped in the presentation of Typo3 6.0 has errors and leads to the
>> problem of the empty object.
>
> Check out the official docs for that and report missing stuff as tickets in
> forge/documentation.
> http://docs.typo3.org/typo3cms/FileAbstractionLayerReference/
>
> Cheers
>



More information about the TYPO3-dev mailing list