class SocialLanguageConfigOverride in Open Social 8
Same name and namespace in other branches
- 8.9 modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride
- 8.2 modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride
- 8.3 modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride
- 8.4 modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride
- 8.5 modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride
- 8.6 modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride
- 8.7 modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride
- 8.8 modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride
- 10.3.x modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride
- 10.0.x modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride
- 10.1.x modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride
- 10.2.x modules/custom/social_language/src/SocialLanguageConfigOverride.php \Drupal\social_language\SocialLanguageConfigOverride
Class SocialLanguageConfigOverride.
@package Drupal\social_language
Hierarchy
- class \Drupal\social_language\SocialLanguageConfigOverride implements ConfigFactoryOverrideInterface
Expanded class hierarchy of SocialLanguageConfigOverride
2 string references to 'SocialLanguageConfigOverride'
- SocialLanguageConfigOverride::getCacheSuffix in modules/
custom/ social_language/ src/ SocialLanguageConfigOverride.php - The string to append to the configuration static cache name.
- social_language.services.yml in modules/
custom/ social_language/ social_language.services.yml - modules/custom/social_language/social_language.services.yml
1 service uses SocialLanguageConfigOverride
- social_language.override in modules/
custom/ social_language/ social_language.services.yml - \Drupal\social_language\SocialLanguageConfigOverride
File
- modules/
custom/ social_language/ src/ SocialLanguageConfigOverride.php, line 14
Namespace
Drupal\social_languageView source
class SocialLanguageConfigOverride implements ConfigFactoryOverrideInterface {
/**
* Load overrides.
*/
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;
}
/**
* {@inheritdoc}
*/
public function getCacheSuffix() {
return 'SocialLanguageConfigOverride';
}
/**
* {@inheritdoc}
*/
public function getCacheableMetadata($name) {
return new CacheableMetadata();
}
/**
* {@inheritdoc}
*/
public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION) {
return NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SocialLanguageConfigOverride:: |
public | function |
Creates a configuration object for use during install and synchronization. Overrides ConfigFactoryOverrideInterface:: |
|
SocialLanguageConfigOverride:: |
public | function |
Gets the cacheability metadata associated with the config factory override. Overrides ConfigFactoryOverrideInterface:: |
|
SocialLanguageConfigOverride:: |
public | function |
The string to append to the configuration static cache name. Overrides ConfigFactoryOverrideInterface:: |
|
SocialLanguageConfigOverride:: |
public | function |
Load overrides. Overrides ConfigFactoryOverrideInterface:: |