[TYPO3-mvc] Thank you - You're really freaky
Stefan Frömken
firma at sfroemken.de
Thu Sep 8 15:58:54 CEST 2011
Hello MVC-Team,
I just get an exception because I have forgotten to append "Repository"
to my repositories filename. The exception was thrown in
ClassInfoFactory.php->getInjectMethods()
I study this method and try to do the following in my ActionController:
/**
* @param language $lang
* @return void
*/
public function injectLanguage(language $lang) {
$this->lang = $lang;
$this->lang->init('de');
$this->LOCAL_LANG =
$this->lang->includeLLFile('EXT:iknewsfields/locallang_db.xml', 0);
}
And I thought this would only work with inject*Repository. NO!!! IT
WORKS WITH EVERY REGISTERED CLASS!
Yeah...that's really great. This cleans up the code very well and is
much better for UnitTests.
Thanks
Stefan
More information about the TYPO3-project-typo3v4mvc
mailing list