Details
-
Story
-
Resolution: Fixed
-
High
-
5.4-dev
Description
For now, if one want to develop a service that needs siteaccess-aware settings (e.g. language settings), they need to inject the ConfigResolver and get the needed settings from it.
This is not very convenient nor explicit.
Goal of this story is to allow developers to inject these dynamic settings explicitly from their service definition (yml, xml, annotation...).
Static container parameters follows the %<parameter_name>% syntax in Symfony.
Dynamic parameters would follow:
$<parameter_name>[, <namespace>[, <scope>]]$
Default namespace is still ezsettings, and default scope is current siteaccess.
See implementation in EzPublishCoreExtraBundle for inspiration, but try to take advantage of ExpressionLanguage component (Introduced in Symfony 2.4, but can be used standalone).