[TYPO3-mvc] ActionController line-Change

Franz Koch typo3.RemoveForMessage at elements-net.de
Sun Feb 28 21:14:03 CET 2010


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 ;)
-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list