« Previous | Next » 

Revision 46378319


Added by Marc Neuhaus about 8 years ago

[FEATURE] Support injecting Settings through annotation

This change extends the existing inject annotation with two new

  • setting: to specify a path to a setting that should be injected into that property
  • package: the package to load the setting from, by default the package that the class belongs to

The main goal is to make the access to settings more convenient, because
you currently need to inject the configurationManager and get the setting
manually from it, even if you only need one simple string.

As a best practice the user should add an setter for it's settings as well, but
this is only to make more portable. This change does not need a setter.


 * @var string
 * @Flow\Inject(setting="my.setting")
protected $foo;
 * @var string
 * @Flow\Inject(setting="core.phpBinaryPathAndFilename", package="TYPO3.Flow")
protected $phpBinary;

Releases: master
Change-Id: Id84d087307d348ecd3079fc6097df193ebecb08a

  • added
  • modified
  • copied
  • renamed
  • deleted