[TYPO3-mvc] 3 questions reagarding fluid and extbase
Kay Strobach
typo3 at kay-strobach.de
Wed Dec 1 20:04:35 CET 2010
Hello Franz,
Am 01.12.2010 19:49, schrieb Franz Koch:
>>
>> How would you map it to a empty domainObject?
>
> just the regular way by iterating over your json data and map it to php
> (domain) objects using setters. Having a little object identity cache
> you could also create recursions easily. Not sure if this is better then
> writing a custom viewHelper though - probably about the same effort.
>
Mhmm, not sure (I'm new to Extbase and Fluid :=).
The problem is, that the response is nearly completly unknown - just
know it's json - :( and it's just displayed with fluid (smarty or phptal
in former versions).
So i know the structure only while building the template :(
It's currently working with that (still needs some validation):
ViewHelper:
class Tx_Ksapiclient_ViewHelpers_TestViewHelper extends
Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
/**
* @param $obj object Object
* @param $prop string Property
*/
public function render($obj,$prop) {
return $obj->$prop;
}
}
Template :)
{namespace helper=Tx_Ksapiclient_ViewHelpers}
{helper:test(obj: results, prop:"fortbildung")}
Anyway many thanks for your help (still hoping that bug will be fixed ;))
Best regards
Kay
More information about the TYPO3-project-typo3v4mvc
mailing list