private function SocialTaggingOverrides::shouldApplyOverrides in Open Social 10.2.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_tagging/src/SocialTaggingOverrides.php \Drupal\social_tagging\SocialTaggingOverrides::shouldApplyOverrides()
- 8.7 modules/social_features/social_tagging/src/SocialTaggingOverrides.php \Drupal\social_tagging\SocialTaggingOverrides::shouldApplyOverrides()
- 8.8 modules/social_features/social_tagging/src/SocialTaggingOverrides.php \Drupal\social_tagging\SocialTaggingOverrides::shouldApplyOverrides()
- 10.3.x modules/social_features/social_tagging/src/SocialTaggingOverrides.php \Drupal\social_tagging\SocialTaggingOverrides::shouldApplyOverrides()
- 10.0.x modules/social_features/social_tagging/src/SocialTaggingOverrides.php \Drupal\social_tagging\SocialTaggingOverrides::shouldApplyOverrides()
- 10.1.x modules/social_features/social_tagging/src/SocialTaggingOverrides.php \Drupal\social_tagging\SocialTaggingOverrides::shouldApplyOverrides()
Whether this config override should apply to the provided configurations.
Used to check what to return in loadOverrides as well as in the metadata method.
Parameters
array $names: The names of the configs for which overrides are being loaded.
Return value
bool Whether we override those configs.
2 calls to SocialTaggingOverrides::shouldApplyOverrides()
- SocialTaggingOverrides::getCacheableMetadata in modules/
social_features/ social_tagging/ src/ SocialTaggingOverrides.php - Gets the cacheability metadata associated with the config factory override.
- SocialTaggingOverrides::loadOverrides in modules/
social_features/ social_tagging/ src/ SocialTaggingOverrides.php - Returns config overrides.
File
- modules/
social_features/ social_tagging/ src/ SocialTaggingOverrides.php, line 26
Class
- SocialTaggingOverrides
- Configuration override.
Namespace
Drupal\social_taggingCode
private function shouldApplyOverrides(array $names) {
$config_names = [
'views.view.search_content',
'views.view.search_groups',
'views.view.search_users',
'search_api.index.social_content',
'search_api.index.social_groups',
'search_api.index.social_users',
'views.view.latest_topics',
'views.view.upcoming_events',
'views.view.topics',
'views.view.events',
'views.view.group_topics',
'views.view.group_events',
'views.view.newest_groups',
'views.view.newest_users',
'core.entity_view_display.profile.profile.default',
];
// We loop over the provided names instead of the config names we override
// which is slightly faster in the case of being called from
// `getCacheableMetadata` which checks for a single config only.
foreach ($names as $name) {
if (in_array($name, $config_names)) {
return TRUE;
}
}
return FALSE;
}