[TYPO3-mvc] ActionController line-Change

Steffen Ritter info at rs-websystems.de
Mon Mar 1 08:00:00 CET 2010


Franz Koch schrieb:
> Hey,
> 
>> 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. "general" arguments could be done easier this way.
> 
> as Sebastian pointed out it could be a problem moving the lines, but you 
> could simply extend the method initializeView:
> 
> public function initializeView() {
>     parent::initializeView();
>     $this->view->assign('someGlobalStuff',$this->settings['someGlobalStuff']); 
> 
> }
> 
> Works like a charm for me ;)
tha badest would be "double initializing" an view, so "work" is done twice.
initializeView() would work, shure. thanks. I will put this in my own 
abstract controller.


More information about the TYPO3-project-typo3v4mvc mailing list