public function SocialFilePrivateTextEditorConfigOverride::loadOverrides in Open Social 8.2
Same name and namespace in other branches
- 8.9 modules/custom/social_file_private/src/SocialFilePrivateTextEditorConfigOverride.php \Drupal\social_file_private\SocialFilePrivateTextEditorConfigOverride::loadOverrides()
- 8 modules/custom/social_file_private/src/SocialFilePrivateTextEditorConfigOverride.php \Drupal\social_file_private\SocialFilePrivateTextEditorConfigOverride::loadOverrides()
- 8.3 modules/custom/social_file_private/src/SocialFilePrivateTextEditorConfigOverride.php \Drupal\social_file_private\SocialFilePrivateTextEditorConfigOverride::loadOverrides()
- 8.4 modules/custom/social_file_private/src/SocialFilePrivateTextEditorConfigOverride.php \Drupal\social_file_private\SocialFilePrivateTextEditorConfigOverride::loadOverrides()
- 8.5 modules/custom/social_file_private/src/SocialFilePrivateTextEditorConfigOverride.php \Drupal\social_file_private\SocialFilePrivateTextEditorConfigOverride::loadOverrides()
- 8.6 modules/custom/social_file_private/src/SocialFilePrivateTextEditorConfigOverride.php \Drupal\social_file_private\SocialFilePrivateTextEditorConfigOverride::loadOverrides()
- 8.7 modules/custom/social_file_private/src/SocialFilePrivateTextEditorConfigOverride.php \Drupal\social_file_private\SocialFilePrivateTextEditorConfigOverride::loadOverrides()
- 8.8 modules/custom/social_file_private/src/SocialFilePrivateTextEditorConfigOverride.php \Drupal\social_file_private\SocialFilePrivateTextEditorConfigOverride::loadOverrides()
- 10.3.x modules/custom/social_file_private/src/SocialFilePrivateTextEditorConfigOverride.php \Drupal\social_file_private\SocialFilePrivateTextEditorConfigOverride::loadOverrides()
- 10.0.x modules/custom/social_file_private/src/SocialFilePrivateTextEditorConfigOverride.php \Drupal\social_file_private\SocialFilePrivateTextEditorConfigOverride::loadOverrides()
- 10.1.x modules/custom/social_file_private/src/SocialFilePrivateTextEditorConfigOverride.php \Drupal\social_file_private\SocialFilePrivateTextEditorConfigOverride::loadOverrides()
- 10.2.x modules/custom/social_file_private/src/SocialFilePrivateTextEditorConfigOverride.php \Drupal\social_file_private\SocialFilePrivateTextEditorConfigOverride::loadOverrides()
Returns config overrides.
Parameters
array $names: A list of configuration names that are being loaded.
Return value
array An array keyed by configuration name of override data. Override data contains a nested array structure of overrides.
Overrides ConfigFactoryOverrideInterface::loadOverrides
File
- modules/
custom/ social_file_private/ src/ SocialFilePrivateTextEditorConfigOverride.php, line 41
Class
- SocialFilePrivateTextEditorConfigOverride
- Class SocialFilePrivateTextEditorConfigOverride.
Namespace
Drupal\social_file_privateCode
public function loadOverrides($names) {
$overrides = [];
if (PrivateStream::basePath()) {
$config_names = $this
->getTextEditorsToProtect();
foreach ($config_names as $config_name) {
if (in_array($config_name, $names)) {
$config = \Drupal::service('config.factory')
->getEditable($config_name);
$scheme = $config
->get('image_upload.scheme');
if ($scheme == 'public') {
$overrides[$config_name]['image_upload']['scheme'] = 'private';
}
}
}
}
return $overrides;
}