[Flow] How to retrieve settings?

Axel Wüstemann awu at qbus.de
Fri Jan 3 18:48:53 CET 2014


Am 09.10.2013 12:37, schrieb Sebastian Kurfürst:
> Hey Axel,
>
> that definitely works like this. I guess there is some error in a naming
> convention you have done. Could you post the exact Namespace of your
> controller, and the exact part from your settings.yaml?
>
> Furthermore, you can check ./flow configuration:show --type Settings
> --path MYKEY.MyPackage to see if they are found in general by Flow.
>
>
> Greets, Sebastian


Sebastian, I did not focus anymore on this, but now I came to the same 
result. Here my setup:

Qbus.Bestdesq/Configuration/settings.yaml

Qbus:
   Bestdesq:
     version: '1.0'

./flow configuration:show --type Settings --path Qbus.Bestdesq

version: '1.0'
Dashboard: {  }
Project: {  }


Qbus.Bestdesq/.../Classes/Controller/AbstractModuleController

namespace Qbus\Bestdesq\Controller;

     /**
      * @var array
      */
     protected $settings;

     /**
      * Inject the settings
      *
      * @param array $settings
      * @return void
      */
     public function injectSettings(array $settings) {
         $this->settings = $settings;
     }

     protected function initializeView() {
        $view->assign('version', $this->settings['version']);

        \TYPO3\Flow\var_dump($this->settings); // ==> NULL
     }

Thank you again
Axel


More information about the Flow mailing list