---
title: "findAll und countAll im Backend"
url: "https://www.typo3.net/d/110204-findall-und-countall-im-backend"
source: "typo3.net"
tags: ["Extensions","Extbase","Frage"]
created: "2012-04-14"
last_reply: "2012-04-18"
replies: 2
solved: false
page: 1
pages: 1
lang: "de"
---

# findAll und countAll im Backend

Extensions › Extbase · 2 Antworten · gestartet 2012-04-14

## Eröffnungsbeitrag

**Stargast** · 2012-04-14 · [Beitrag #1](https://www.typo3.net/d/110204-findall-und-countall-im-backend/1)

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:

```php
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?

## Antworten

### [#2](https://www.typo3.net/d/110204-findall-und-countall-im-backend/2) · freshman17 · 2012-04-17

Das Modul im TypoScript auch richtig registriert?

```typoscript
 # 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}
 }
}
```

### [#3](https://www.typo3.net/d/110204-findall-und-countall-im-backend/3) · Stargast · 2012-04-18

Ah, Anfängerfehler. Danke, das wars! :)

---

Quelle: „findAll und countAll im Backend“, typo3.net, https://www.typo3.net/d/110204-findall-und-countall-im-backend
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
