Including own YAML files

(Markus Günther) #1

In flow is it possible to inject configuration from the settings yaml files via @InjectConfiguration annotation.

     * @var array
     * @Flow\InjectConfiguration("")
    protected $ownConfiguration;

Now I used that for a lot of stuff and it would be nice to have the most part in a file. Is it possible to inject this from other files? Foo.yaml or so.

(Soren Malling) #2

I can suggest two things:

  1. Use the path parameter. You can tell the injection what path of the configuration you want
  2. Register your own configuration type and use the type parameter to inject that configuration instead. Look in the Package.php file of Neos.Neos to see how they registered the NodeTypes.yaml configuration

(Markus Günther) #3

@sorenmalling your blazing fast :smiley: