protected function ConfigFactory::loadDomainOverrides in Domain Access 8
Get Domain module overrides for the named configuration objects.
Parameters
array $names: The names of the configuration objects to get overrides for.
Return value
array An array of overrides keyed by the configuration object name.
2 calls to ConfigFactory::loadDomainOverrides()
- ConfigFactory::doGet in domain_config_ui/
src/ Config/ ConfigFactory.php - Returns a configuration object for a given name.
- ConfigFactory::doLoadMultiple in domain_config_ui/
src/ Config/ ConfigFactory.php - Returns a list of configuration objects for the given names.
File
- domain_config_ui/
src/ Config/ ConfigFactory.php, line 143
Class
- ConfigFactory
- Extends core ConfigFactory class to save domain specific configuration.
Namespace
Drupal\domain_config_ui\ConfigCode
protected function loadDomainOverrides(array $names) {
$overrides = [];
foreach ($names as $name) {
// Try to load the language-specific domain override.
$config_name = $this->domainConfigUIManager
->getSelectedConfigName($name);
if ($override = $this->storage
->read($config_name)) {
$overrides[$name] = $override;
}
elseif ($this->domainConfigUIManager
->getSelectedLanguageId()) {
$omit_language = TRUE;
$config_name = $this->domainConfigUIManager
->getSelectedConfigName($name, $omit_language);
if ($override = $this->storage
->read($config_name)) {
$overrides[$name] = $override;
}
}
}
return $overrides;
}