Zum Inhalt springen

findAll und countAll im Backend

Erstellt am 14. April 2012 · 2 Antworten · letzte Antwort am 18. April 2012

Tags: Frage

Stargast ·

Hey,
bin gerade dabei ein Modul zu schreiben.
Nur liefern mir findAll und countAll im Backend keine Ergebnisse. In diversen FE-Plugins funktioniert das.

Ich schätze es liegt daran, dass ich auf ein "fremdes" Repo zugreife.
Hier der Code dazu:

class Tx_Extension_Controller_BackendController extends Tx_Extension_Controller_AbstractController {
	protected $galleryRepository;

	public function injectGalleryRepository(Tx_Extension_Domain_Repository_GalleryRepository $galleryRepository) {
		$this->galleryRepository = $galleryRepository;
	}
	
	public function indexAction() {
		$galleries = $this->galleryRepository->findAll();
		$cnt = $this->galleryRepository->countAll();
		$this->view->assign('galleries', $galleries)->assign('cnt', $cnt);
	}
}

Hat jemand eine Idee?

freshman17 ·

Das Modul im TypoScript auch richtig registriert?

 # Module configuration
module.tx_extension {
 settings < plugin.tx_extension.settings
 persistence < plugin.tx_extension.persistence
 view < plugin.tx_extension.view
 view {
  templateRootPath = {$module.tx_extension.view.templateRootPath}
  partialRootPath = {$module.tx_extension.view.partialRootPath}
  layoutRootPath = {$module.tx_extension.view.layoutRootPath}
 }
}