function hook_config_translation_info_alter
Same name in other branches
- 9 core/modules/config_translation/config_translation.api.php \hook_config_translation_info_alter()
- 8.9.x core/modules/config_translation/config_translation.api.php \hook_config_translation_info_alter()
- 10 core/modules/config_translation/config_translation.api.php \hook_config_translation_info_alter()
Alter existing translation tabs for translation of configuration.
This hook is useful to extend existing configuration mappers with new configuration names, for example when altering existing forms with new settings stored elsewhere. This allows the translation experience to also reflect the compound form element in one screen.
Parameters
array $info: An associative array of discovered configuration mappers. Use an entity name for the key (for entity mapping) or a unique string for configuration name list mapping. The values of the associative array are arrays themselves in the same structure as the *.config_translation.yml files.
See also
hook_translation_info()
\Drupal\config_translation\ConfigMapperManagerInterface
Related topics
1 function implements hook_config_translation_info_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- config_translation_test_config_translation_info_alter in core/
modules/ config_translation/ tests/ modules/ config_translation_test/ config_translation_test.module - Implements hook_config_translation_info_alter().
1 invocation of hook_config_translation_info_alter()
- ConfigMapperManager::__construct in core/
modules/ config_translation/ src/ ConfigMapperManager.php - Constructs a ConfigMapperManager.
File
-
core/
modules/ config_translation/ config_translation.api.php, line 83
Code
function hook_config_translation_info_alter(&$info) {
// Add additional site settings to the site information screen, so it shows
// up on the translation screen. (Form alter in the elements whose values are
// stored in this config file using regular form altering on the original
// configuration form.)
$info['system.site_information_settings']['names'][] = 'example.site.setting';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.