[TYPO3-mvc] Problem calling a repository function
Franz Koch
typo3.RemoveForMessage at elements-net.de
Mon Jan 31 11:40:56 CET 2011
Hey Raymund,
> Here is the render function in my view helper (courtesy to Franz).
>
> public function render(Tx_References_Domain_Model_Service $service, $as) {
> t3lib_div::devLog('render: ' . $service. ' ' . $as, 'utek_referenzen', 0);
>
> $projectRepository =
> t3lib_div::makeInstance('Tx_References_Domain_Repository_ProjectRepository');
> $projects = $projectRepository->findByService($service);
...
> }
>
...
> Any idea how I can find out, why it isn't working?
>
> I have another view helper which basically does the same for a
> different set of objects and that works like a charm.
Although it should also work using t3lib_div::makeInstance (as long as
you haven't overwritten the constructor method in the repository) please
give it a try and instantiate the repository via the objectManager if
you're using extbase 1.3.0 (or later).
If the problem still exists I'll have a closer.
--
kind regards,
Franz Koch
More information about the TYPO3-project-typo3v4mvc
mailing list