class SocialProfileOrgTagConfigOverride in Open Social 10.3.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_profile/modules/social_profile_organization_tag/src/SocialProfileOrgTagConfigOverride.php \Drupal\social_profile_organization_tag\SocialProfileOrgTagConfigOverride
- 8.4 modules/social_features/social_profile/modules/social_profile_organization_tag/src/SocialProfileOrgTagConfigOverride.php \Drupal\social_profile_organization_tag\SocialProfileOrgTagConfigOverride
- 8.5 modules/social_features/social_profile/modules/social_profile_organization_tag/src/SocialProfileOrgTagConfigOverride.php \Drupal\social_profile_organization_tag\SocialProfileOrgTagConfigOverride
- 8.6 modules/social_features/social_profile/modules/social_profile_organization_tag/src/SocialProfileOrgTagConfigOverride.php \Drupal\social_profile_organization_tag\SocialProfileOrgTagConfigOverride
- 8.7 modules/social_features/social_profile/modules/social_profile_organization_tag/src/SocialProfileOrgTagConfigOverride.php \Drupal\social_profile_organization_tag\SocialProfileOrgTagConfigOverride
- 8.8 modules/social_features/social_profile/modules/social_profile_organization_tag/src/SocialProfileOrgTagConfigOverride.php \Drupal\social_profile_organization_tag\SocialProfileOrgTagConfigOverride
- 10.0.x modules/social_features/social_profile/modules/social_profile_organization_tag/src/SocialProfileOrgTagConfigOverride.php \Drupal\social_profile_organization_tag\SocialProfileOrgTagConfigOverride
- 10.1.x modules/social_features/social_profile/modules/social_profile_organization_tag/src/SocialProfileOrgTagConfigOverride.php \Drupal\social_profile_organization_tag\SocialProfileOrgTagConfigOverride
- 10.2.x modules/social_features/social_profile/modules/social_profile_organization_tag/src/SocialProfileOrgTagConfigOverride.php \Drupal\social_profile_organization_tag\SocialProfileOrgTagConfigOverride
Class SocialProfileOrgTagConfigOverride.
@package Drupal\social_profile_organization_tag
Hierarchy
- class \Drupal\social_profile_organization_tag\SocialProfileOrgTagConfigOverride implements ConfigFactoryOverrideInterface
Expanded class hierarchy of SocialProfileOrgTagConfigOverride
2 string references to 'SocialProfileOrgTagConfigOverride'
- SocialProfileOrgTagConfigOverride::getCacheSuffix in modules/
social_features/ social_profile/ modules/ social_profile_organization_tag/ src/ SocialProfileOrgTagConfigOverride.php - The string to append to the configuration static cache name.
- social_profile_organization_tag.services.yml in modules/
social_features/ social_profile/ modules/ social_profile_organization_tag/ social_profile_organization_tag.services.yml - modules/social_features/social_profile/modules/social_profile_organization_tag/social_profile_organization_tag.services.yml
1 service uses SocialProfileOrgTagConfigOverride
- social_profile_organization_tag.override in modules/
social_features/ social_profile/ modules/ social_profile_organization_tag/ social_profile_organization_tag.services.yml - \Drupal\social_profile_organization_tag\SocialProfileOrgTagConfigOverride
File
- modules/
social_features/ social_profile/ modules/ social_profile_organization_tag/ src/ SocialProfileOrgTagConfigOverride.php, line 14
Namespace
Drupal\social_profile_organization_tagView source
class SocialProfileOrgTagConfigOverride implements ConfigFactoryOverrideInterface {
/**
* Load overrides.
*/
public function loadOverrides($names) {
$overrides = [];
$config_factory = \Drupal::service('config.factory');
// Override profile form display.
$config_name = 'core.entity_form_display.profile.profile.default';
if (in_array($config_name, $names)) {
$config = $config_factory
->getEditable($config_name);
$children = $config
->get('third_party_settings.field_group.group_profile_self_intro.children');
$children[] = 'field_profile_organization_tag';
$content = $config
->get('content');
$content['field_profile_organization_tag'] = [
'type' => 'entity_reference_autocomplete',
'weight' => 10,
'region' => 'content',
'settings' => [
'match_operator' => 'CONTAINS',
'size' => 60,
'placeholder' => '',
],
'third_party_settings' => [],
];
$overrides[$config_name] = [
'third_party_settings' => [
'field_group' => [
'group_tags' => [
'children' => [
'field_profile_organization_tag',
],
'parent_name' => '',
'weight' => 99,
'label' => t('Tags')
->render(),
'format_type' => 'fieldset',
'format_settings' => [
'label' => t('Tags')
->render(),
'required_fields' => FALSE,
'id' => 'group_tags',
'classes' => 'scrollspy',
],
],
],
],
'content' => $content,
];
}
return $overrides;
}
/**
* {@inheritdoc}
*/
public function getCacheSuffix() {
return 'SocialProfileOrgTagConfigOverride';
}
/**
* {@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 |
---|---|---|---|---|
SocialProfileOrgTagConfigOverride:: |
public | function |
Creates a configuration object for use during install and synchronization. Overrides ConfigFactoryOverrideInterface:: |
|
SocialProfileOrgTagConfigOverride:: |
public | function |
Gets the cacheability metadata associated with the config factory override. Overrides ConfigFactoryOverrideInterface:: |
|
SocialProfileOrgTagConfigOverride:: |
public | function |
The string to append to the configuration static cache name. Overrides ConfigFactoryOverrideInterface:: |
|
SocialProfileOrgTagConfigOverride:: |
public | function |
Load overrides. Overrides ConfigFactoryOverrideInterface:: |