Including own YAML files

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

   /**
     * @var array
     * @Flow\InjectConfiguration("foo.bar")
     */
    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.

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
1 Like

@sorenmalling your blazing fast :smiley:

1 Like