[TYPO3-mvc] ActionController line-Change
Thomas "Thasmo" Deinhamer
thasmo at gmail.com
Thu Feb 25 18:55:35 CET 2010
You could just set all those stuff
inside the initializeAction() method in each controller. No?
This method is called before each called action method.
You can even use initialite<Specific>Action() to set specific
things for the specific action.
Furthermore there's a dedicated method for initializing
the view, called initializeView($view), also passing the view to it.
Just have a look at the Abstract and the Action Controller classes.
Thomas
Am 25.02.2010 16:06, schrieb Steffen Ritter:
> Martin Kutschker schrieb:
>> Steffen Ritter schrieb:
>>> Hey list,
>>> what do you think about moving line 139 of ActionController.php[1]
>>> before line 130?
>>> This would enable me to "set default" vars, which I need in every View.
>>> Currently I have to set $this->view->assign('whatever','myvalue'); in
>>> every view itself.
>>
>> You mean you want set variables for all views of the controller?
>> Sounds reasonable to me.
>>
>> Masi
> yes, that's what I mean. Could be things like:
> $this->view->assign('setting',$this->setting['myController']);
> $this->view->assign('pluginPIDs',$this->setting['pluginPIDs']);
>
> with result that you could do f.e.:
> <f:link.action action="single" pageUid="{pluginPIDs.singleView}" />
>
> currently I have to set the "assign" in every action method again and
> again.
>
> regards
>
> Steffen
More information about the TYPO3-project-typo3v4mvc
mailing list