public function SocialLanguageConfigOverride::loadOverrides in Open Social 8
Same name and namespace in other branches
- 8.9 modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride::loadOverrides()
- 8.2 modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride::loadOverrides()
- 8.3 modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride::loadOverrides()
- 8.4 modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride::loadOverrides()
- 8.5 modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride::loadOverrides()
- 8.6 modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride::loadOverrides()
- 8.7 modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride::loadOverrides()
- 8.8 modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride::loadOverrides()
- 10.3.x modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride::loadOverrides()
- 10.0.x modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride::loadOverrides()
- 10.1.x modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride::loadOverrides()
- 10.2.x modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride::loadOverrides()
Load overrides.
Overrides ConfigFactoryOverrideInterface::loadOverrides
File
- modules/
custom/ social_language/ src/ SocialLanguageConfigOverride.php, line 19
Class
- SocialLanguageConfigOverride
- Class SocialLanguageConfigOverride.
Namespace
Drupal\social_languageCode
public function loadOverrides($names) {
$overrides = [];
$config_factory = \Drupal::service('config.factory');
// Override user form display.
$config_name = 'core.entity_form_display.user.user.default';
if (in_array($config_name, $names)) {
$config = $config_factory
->getEditable($config_name);
$children = $config
->get('third_party_settings.field_group.group_locale_settings.children');
$children[] = 'language';
$content = $config
->get('content');
$content['language'] = [
'weight' => 1,
'region' => 'content',
'settings' => [],
'third_party_settings' => [],
];
$hidden = $config
->get('hidden');
unset($hidden['language']);
$overrides[$config_name] = [
'third_party_settings' => [
'field_group' => [
'group_locale_settings' => [
'children' => $children,
],
],
],
'content' => $content,
'hidden' => $hidden,
];
}
return $overrides;
}