---
title: "Extbase $this->configurationManager->getConfiguration view leer"
url: "https://www.typo3.net/d/110464-extbase-this-configurationmanager-getconfiguration-view-leer"
source: "typo3.net"
tags: ["Extensions","Extbase","Frage"]
created: "2012-05-06"
last_reply: "2012-05-09"
replies: 4
solved: false
page: 1
pages: 1
lang: "de"
---

# Extbase $this->configurationManager->getConfiguration view leer

Extensions › Extbase · 4 Antworten · gestartet 2012-05-06

## Eröffnungsbeitrag

**rleuthold** · 2012-05-06 · [Beitrag #1](https://www.typo3.net/d/110464-extbase-this-configurationmanager-getconfiguration-view-leer/1)

Hallo Zusammen,

Zuerst einmal - ja, das ist ein [Cross Posting](http://www.typo3forum.net/forum/extension-modifizieren-neu-erstellen/55891-extbase-configurationmanager-getconfiguration-view-leer.html). Da ich im anderen Forum keine Antwort erhalten habe, versuche ich es mal hier bei Euch, denn hier gibt es für Extbase / Fluid Entwicklung ein eigenes Thema (Leider konnte ich den Thread im anderen Forum nicht löschen).

So, nun zu meinem Problem:

Ich entwickle eine neue Extbase / Fluid Extension. Die Basis der Extension und das Domain Model lieferte der ExtensionBuilder.

Nun möchte ich aus einem Controller auf die TypoScript Variable

```typoscript
plugin.tx_abounitreservation.view.templateRootPath
```

zugreifen.

Das geht laut verschiedenen Quellen auf dem Netz ganz einfach so:

```php
$extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);        
$templateRootPath = t3lib_div::getFileAbsFileName($extbaseFrameworkConfiguration['view']['templateRootPath']);
```

Leider sieht dann das beim Debuggen bei mir so aus:

[Bild: dl.dropbox.com/…/debugger-configuration.png](http://dl.dropbox.com/u/38483/debugger-configuration.png)

Alle variablen im view sind leer.

Mein TypoScript sieht so aus:

constants.txt

```typoscript
plugin.tx_abounitreservation {
    view {
        # cat=plugin.tx_abounitreservation/file; type=string; label=Path to template root (FE)
        templateRootPath = EXT:abo_unit_reservation/Resources/Private/Templates/
        # cat=plugin.tx_abounitreservation/file; type=string; label=Path to template partials (FE)
        partialRootPath = EXT:abo_unit_reservation/Resources/Private/Partials/
        # cat=plugin.tx_abounitreservation/file; type=string; label=Path to template layouts (FE)
        layoutRootPath = EXT:abo_unit_reservation/Resources/Private/Layouts/
    }
    persistence {
        # cat=plugin.tx_abounitreservation//a; type=string; label=Default storage PID
        storagePid = 
    }
}
```

setup.txt

```typoscript
plugin.tx_abounitreservation {
    view {
        templateRootPath = {$plugin.tx_abounitreservation.view.templateRootPath}
        partialRootPath = {$plugin.tx_abounitreservation.view.partialRootPath}
        layoutRootPath = {$plugin.tx_abounitreservation.view.layoutRootPath}
    }
    persistence {
        storagePid = {$plugin.tx_abounitreservation.persistence.storagePid}
    }
}
```

Sieht für mich alles ganz richtig aus. Hat irgend jemand eine Idee, warum das nicht klappt?

Grüsse & Danke
Rico

## Antworten

### [#2](https://www.typo3.net/d/110464-extbase-this-configurationmanager-getconfiguration-view-leer/2) · freshman17 · 2012-05-09

Wo erfolgt der Aufruf, im FE oder BE? Unabhängig davon, kommst du an das ganze TS so dran:

```php
$extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
```

Ansonsten siehe [hier](https://www.typo3.net/d/110507-logging-in-einer-extension/2).

### [#3](https://www.typo3.net/d/110464-extbase-this-configurationmanager-getconfiguration-view-leer/3) · rleuthold · 2012-05-09

Danke für Deine Antwort!

Der Aufruf erfolgt im Controller, welcher wiederum aus der View (Fluid Template) aufgerufen wird.

Wenn ich das gesamte TS wie von Dir vorgeschlagen abfrage, findet sich das view array mit den Template Paths unter:

```typoscript
plugin.tx_abounitreservation.view
```

[Bild: dl.dropbox.com/…/CONFIGURATION_TYPE_FULL_TYPOSCRIPT.png](http://dl.dropbox.com/u/38483/CONFIGURATION_TYPE_FULL_TYPOSCRIPT.png)

Ich sehe aber auch diese Vorgehensweise eher als einen Workaround für die eigentlich dafür vorgesehene Methode:

```php
$this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
```

### [#4](https://www.typo3.net/d/110464-extbase-this-configurationmanager-getconfiguration-view-leer/4) · freshman17 · 2012-05-09

also bei funktioniert das:

```php
$extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(
	Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT
);
```

### [#5](https://www.typo3.net/d/110464-extbase-this-configurationmanager-getconfiguration-view-leer/5) · rleuthold · 2012-05-09

Ich denke, ich habe herausgefunden, warum es nicht funktioniert hat. Das TS template war nicht richtig eingebunden (Include und so ;-))!

---

Quelle: „Extbase $this->configurationManager->getConfiguration view leer“, typo3.net, https://www.typo3.net/d/110464-extbase-this-configurationmanager-getconfiguration-view-leer
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
