[TYPO3-german] Wie lese ich Module settings im Backend (extbase Extension)?

g4-lisz at tonarchiv.ch g4-lisz at tonarchiv.ch
Wed Sep 11 22:35:46 CEST 2013


On 09/11/2013 08:58 PM, g4-lisz at tonarchiv.ch wrote:
> Hallo allerseits,
>
> ich bin kurz davor, zu verzweifeln...
>
> Ich kriege es einfach nicht hin, meine Settings im Backend aus zu lesen (T3 4.6).
>
> In meinem Root-Template (Constants) steht:
>
>   plugin.tx_hplusinfo.settings.berichteRootPath=uploads/tx_hplusinfo/berichte/
>
> Im constants.txt der Extension steht:
>   plugin.tx_hplusinfo {
>     settings {
>         ....
>         # cat=plugin.tx_hplusinfo/file; type=string; label=Path to folder containing Berichte
>         berichteRootPath =
>     }
>   }
>
> Im setup.txt der Extension steht:
>   module.tx_hplusinfo {
>     settings {
>       ....
>       berichteRootPath = {$plugin.tx_hplusinfo.settings.berichteRootPath}
>     }
>   }
>
> Im Controller der betreffenden Action habe ich folgendes hinzu gefügt:
>
>         /**
>          * @var Tx_Extbase_Configuration_ConfigurationManagerInterface
>          */
>         protected $configurationManager;
>
>         /**
>          * @param Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager
>          * @return void
>          */
>         public function injectConfigurationManager(Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager) {
>                 $this->configurationManager = $configurationManager;
>         }
>
>         /**
>          * @return void
>          */
>         public function initializeAction() {
>                 if(TYPO3_MODE === 'BE') {
>                         $frameworkConfiguration =
> $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
>                         $this->settings = $frameworkConfiguration['settings'];
>                 }
>         }
>
> Trotzdem liefert mit im Backend $this ->settings['berichteRootPath'] einen leeren String.
>
> Was mache ich falsch? Bin für jeden Tipp dankbar.
> Till
>
Ok, ich habe die Ursache gefunden: Das Backend-Modul liest mein
Root-Template nicht ein. Daher sind alle Constants leer.
Ich muss meine Frage neu formulieren, daher ne neue Mail... danke für's
Zuhören ;)
Till


More information about the TYPO3-german mailing list