public function SocialGroupSelectorWidgetConfigOverride::loadOverrides in Open Social 10.1.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_group/src/SocialGroupSelectorWidgetConfigOverride.php \Drupal\social_group\SocialGroupSelectorWidgetConfigOverride::loadOverrides()
- 8 modules/social_features/social_group/src/SocialGroupSelectorWidgetConfigOverride.php \Drupal\social_group\SocialGroupSelectorWidgetConfigOverride::loadOverrides()
- 8.2 modules/social_features/social_group/src/SocialGroupSelectorWidgetConfigOverride.php \Drupal\social_group\SocialGroupSelectorWidgetConfigOverride::loadOverrides()
- 8.3 modules/social_features/social_group/src/SocialGroupSelectorWidgetConfigOverride.php \Drupal\social_group\SocialGroupSelectorWidgetConfigOverride::loadOverrides()
- 8.4 modules/social_features/social_group/src/SocialGroupSelectorWidgetConfigOverride.php \Drupal\social_group\SocialGroupSelectorWidgetConfigOverride::loadOverrides()
- 8.5 modules/social_features/social_group/src/SocialGroupSelectorWidgetConfigOverride.php \Drupal\social_group\SocialGroupSelectorWidgetConfigOverride::loadOverrides()
- 8.6 modules/social_features/social_group/src/SocialGroupSelectorWidgetConfigOverride.php \Drupal\social_group\SocialGroupSelectorWidgetConfigOverride::loadOverrides()
- 8.7 modules/social_features/social_group/src/SocialGroupSelectorWidgetConfigOverride.php \Drupal\social_group\SocialGroupSelectorWidgetConfigOverride::loadOverrides()
- 8.8 modules/social_features/social_group/src/SocialGroupSelectorWidgetConfigOverride.php \Drupal\social_group\SocialGroupSelectorWidgetConfigOverride::loadOverrides()
- 10.3.x modules/social_features/social_group/src/SocialGroupSelectorWidgetConfigOverride.php \Drupal\social_group\SocialGroupSelectorWidgetConfigOverride::loadOverrides()
- 10.0.x modules/social_features/social_group/src/SocialGroupSelectorWidgetConfigOverride.php \Drupal\social_group\SocialGroupSelectorWidgetConfigOverride::loadOverrides()
- 10.2.x modules/social_features/social_group/src/SocialGroupSelectorWidgetConfigOverride.php \Drupal\social_group\SocialGroupSelectorWidgetConfigOverride::loadOverrides()
Load overrides.
Overrides ConfigFactoryOverrideInterface::loadOverrides
File
- modules/
social_features/ social_group/ src/ SocialGroupSelectorWidgetConfigOverride.php, line 19
Class
- SocialGroupSelectorWidgetConfigOverride
- Class SocialGroupSelectorWidgetConfigOverride.
Namespace
Drupal\social_groupCode
public function loadOverrides($names) {
$overrides = [];
$config_names = [
'core.entity_form_display.node.event.default',
'core.entity_form_display.node.topic.default',
];
foreach ($config_names as $config_name) {
if (in_array($config_name, $names)) {
$config = \Drupal::service('config.factory')
->getEditable($config_name);
// Add the field to the content.
$content = $config
->get('content');
$content['groups'] = [];
$content['groups']['type'] = 'social_group_selector_widget';
$content['groups']['settings'] = [];
$content['groups']['weight'] = 16;
$content['groups']['region'] = 'content';
$content['groups']['third_party_settings'] = [];
$overrides[$config_name] = [
'content' => $content,
];
}
}
return $overrides;
}