[TYPO3-mvc] netbeans and factory object type hints / code completion

Stephan Petzl spetzl at gmx.at
Wed May 19 10:11:08 CEST 2010


Marc Bastian Heinrichs schrieb:
> not very nice, but should work:
> 
> ---------------------------.
> public function initializeAction() {
>  $this->frontendUserRepository = $this->getFrontendUserRepository();
> }
> 
> 
> /**
>  * @return Tx_AjadoProfiles_Domain_Repository_FrontendUserRepository
>  */
> protected function getFrontendUserRepository() {
>   return 
> t3lib_div::makeInstance('Tx_AjadoProfiles_Domain_Repository_FrontendUserRepository'); 
> 
> }
> ----------------------------
> 
> Regards,
> Marc Bastian

found another way to do it:
------------------------------
public function initializeAction() {
     $frontendUserRepository = 
t3lib_div::makeInstance('Tx_AjadoProfiles_Domain_Repository_FrontendUserRepository');
     /* @var $frontendUserRepository 
Tx_AjadoProfiles_Domain_Repository_FrontendUserRepository */
     $this->frontendUserRepository = $frontendUserRepository;
}
------------------------------

that works perfectly for me.

-- 
Best Regards
Stephan Petzl
http://www.ajado.com


More information about the TYPO3-project-typo3v4mvc mailing list