[TYPO3-mvc] Howto query the repository from another extension in your own extension

Thomas Meixner tom.meixner at gmail.com
Mon Jul 9 14:56:46 CEST 2012


Hello List,

I have no luck in accessing the repository of another extension in my own 
controller. It always returns an empty query result. 

I have used the same code in both extensions. In the original extension I 
receive objects while my extension for some reasons always returns an empty 
Query object.

Inside my Controller: (also tried DI but same phenomenon)

class Tx_Ainesnews_Controller_OrganismController extends 
Tx_Extbase_MVC_Controller_ActionController {

public function listAction() {

        $this->newsRepository = $this->objectManager-
>get('Tx_News_Domain_Repository_NewsRepository');
        $newsRecords = $this->newsRepository->findAll();
        Tx_Extbase_Utility_Debugger::var_dump($newsRecords);
}
}

What is peculiar is, that if I have the original plugin and my extension on 
the same page I receive objects in both. If I hide the original extension I 
again get an empty result. 

Any idea what I might be missing here?

Thx,
Thomas



More information about the TYPO3-project-typo3v4mvc mailing list