[TYPO3-mvc] How to retrieve cObj->data ?

Steffen Kamper info at sk-typo3.de
Fri Oct 2 17:47:25 CEST 2009


Hi Bastian,

Bastian Waidelich schrieb:
> Steffen Kamper wrote:
> 
> Hi Steffen,
> 
>> Imho this data should be available.
> 
> Yes, but IMO not in the view data ("settings" is the only "reserved" 
> container currently).
> We might add it to the ControllerContext, @Sebastian or do you have a 
> better idea?
> 

yes, for controller only.
Reason for example is getting the uid of the plugin.
Also reason for cObj in controller is to process any object from TS.

For example: you want allow stdWrap in a TS setting like
color.field = field_presetColors

then you could do it in controller
$color = $this->cObj->stdWrap($this->settings['color'], 
$this->settings['color.']);

Or you want to support objects in TS like

myObject = IMAGE
myobject {...}

then you could process it in controller like
$image = $this->cObj->cObjGetSingle('IMAGE', $this->settings['myObject.']

This is also an answer to other threads, but i spreaded them. I hope you 
see what i want to do, this i used very often in piBase extensions, and 
for sure i want to use it also in extbase extensions.

vg Steffen


More information about the TYPO3-project-typo3v4mvc mailing list