public function SocialDownloadCountConfigOverride::loadOverrides in Open Social 8
Same name and namespace in other branches
- 8.9 modules/social_features/social_download_count/src/SocialDownloadCountConfigOverride.php \Drupal\social_download_count\SocialDownloadCountConfigOverride::loadOverrides()
- 8.2 modules/social_features/social_download_count/src/SocialDownloadCountConfigOverride.php \Drupal\social_download_count\SocialDownloadCountConfigOverride::loadOverrides()
- 8.3 modules/social_features/social_download_count/src/SocialDownloadCountConfigOverride.php \Drupal\social_download_count\SocialDownloadCountConfigOverride::loadOverrides()
- 8.4 modules/social_features/social_download_count/src/SocialDownloadCountConfigOverride.php \Drupal\social_download_count\SocialDownloadCountConfigOverride::loadOverrides()
- 8.5 modules/social_features/social_download_count/src/SocialDownloadCountConfigOverride.php \Drupal\social_download_count\SocialDownloadCountConfigOverride::loadOverrides()
- 8.6 modules/social_features/social_download_count/src/SocialDownloadCountConfigOverride.php \Drupal\social_download_count\SocialDownloadCountConfigOverride::loadOverrides()
- 8.7 modules/social_features/social_download_count/src/SocialDownloadCountConfigOverride.php \Drupal\social_download_count\SocialDownloadCountConfigOverride::loadOverrides()
- 8.8 modules/social_features/social_download_count/src/SocialDownloadCountConfigOverride.php \Drupal\social_download_count\SocialDownloadCountConfigOverride::loadOverrides()
- 10.3.x modules/social_features/social_download_count/src/SocialDownloadCountConfigOverride.php \Drupal\social_download_count\SocialDownloadCountConfigOverride::loadOverrides()
- 10.0.x modules/social_features/social_download_count/src/SocialDownloadCountConfigOverride.php \Drupal\social_download_count\SocialDownloadCountConfigOverride::loadOverrides()
- 10.1.x modules/social_features/social_download_count/src/SocialDownloadCountConfigOverride.php \Drupal\social_download_count\SocialDownloadCountConfigOverride::loadOverrides()
- 10.2.x modules/social_features/social_download_count/src/SocialDownloadCountConfigOverride.php \Drupal\social_download_count\SocialDownloadCountConfigOverride::loadOverrides()
Load overrides.
Overrides ConfigFactoryOverrideInterface::loadOverrides
File
- modules/
social_features/ social_download_count/ src/ SocialDownloadCountConfigOverride.php, line 20
Class
- SocialDownloadCountConfigOverride
- Class SocialDownloadCountConfigOverride.
Namespace
Drupal\social_download_countCode
public function loadOverrides($names) {
$overrides = [];
// Set private file system to files field.
$config_name = 'field.storage.node.field_files';
if (in_array($config_name, $names)) {
$overrides[$config_name] = [
'settings' => [
'uri_scheme' => 'private',
],
];
}
// Set download count widget to files fields.
$content_types = [
'book',
'event',
'page',
'topic',
];
foreach ($content_types as $content_type) {
$config_name = "core.entity_view_display.node.{$content_type}.default";
$overrides[$config_name] = [
'content' => [
'field_files' => [
'type' => 'FieldDownloadCount',
],
],
];
}
return $overrides;
}