[TYPO3-dev] FAL in an Extbase 6.0 extension... but how?!
Anders Gissel
invadercyg at gmail.com
Wed Feb 6 20:45:12 CET 2013
Hello Helmut,
On 06-02-2013 18:21, Helmut Hummel wrote:
>> thanks to some helpful tips from a fellow TYPO3-freak, I was able to get
>> things up and running.
>
> Great you managed to get it going. Who was the "TYPO3-freak"? :)
Karsten Madsen from DKM, Aarhus, Denmark. His insights into the problem
got me on track to getting the TCA-update to work. My usual source of
TYPO3-oracle'isms is Claus Due, but on this particular point he had no
inputs.
>> and once Extbase starts properly
>> supporting FAL (which, currently, it doesn't), you will have to change a
>> lot of things, at the very least in your frontend rendering.
>
> We will be working on that during the Extbase code sprint this weekend.
Awesome!
>> // Use the UID to search sys_file_reference
>> $row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid',
>> 'sys_file_reference', "uid_foreign={$objectUid} AND fieldname = 'file'
>> AND tablenames = 'tx_myext_domain_model_image' AND deleted=0 AND
>> hidden=0");
>> if (is_array($row)) {
>> $fileObject =
>> $this->typo3FALRepository->findFileReferenceByUid($row['uid']);
>
> change this to to:
>
> $fileObject = $this->typo3FALRepository->findByRelation('<your table
> name>', 'file', $this->getUid());
>
> And it will be much cleaner and not so likely to break as it is a
> pulic API.
>
> 'file' here again is the field name defined in TCA.
Oh, nice. I'm pretty new to the game of extbase, so things like these
are always a revelation to me. :-)
Thanks for your pointers – although I must confess I ended up tearing
FAL out of my extension and falling back to ye olde way of doing things
(namely, using /uploads/tx_whatever). It's not nearly as elegant, but it
works just fine, and I can now easily handle multipart-uploads and
similar through the frontend, which my users will need. :-)
Best regards,
Anders
More information about the TYPO3-dev
mailing list