- Issue created by @oliverpolden
- Merge request !49Issue #3385946: Allow setting domain config override → (Merged) created by Unnamed author
- last update
almost 2 years ago 93 pass - 🇬🇧United Kingdom oliverpolden
With this you can inject the domainConfigOverrider (domain_config.overrider) service and then do:
// Load the domain you want.
$domain = $this->myFunctionToLoadADomain($params);
$this->domainConfigOverrider->setDomain($domain);I have tested this by creating an entity from my primary domain with settings on the entity that relate to two different domains. I have an event subscriber on entity insert that determines the domain and triggers a MailChimp campaign. The MailChimp module successfully loads the config for the relevant domain.
- First commit to issue fork.
-
mably →
committed e98674e7 on 2.0.x authored by
oliverpolden →
Issue #3385946: Allow setting domain config override
-
mably →
committed e98674e7 on 2.0.x authored by
oliverpolden →
- 🇫🇷France mably
Merged, thanks!
You might have to call
initiateContext()
before using thesetDomain()
method.