diff --git a/core/core.services.yml b/core/core.services.yml index 022fa7e..1cfed64 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -117,6 +117,8 @@ services: config.typed: class: Drupal\Core\Config\TypedConfigManager arguments: ['@config.storage', '@config.storage.schema', '@cache.discovery'] + tags: + - { name: plugin_manager_cache_clear } context.handler: class: Drupal\Core\Plugin\Context\ContextHandler arguments: ['@typed_data_manager'] diff --git a/core/modules/config_translation/config_translation.api.php b/core/modules/config_translation/config_translation.api.php index 20d7097..27c89b1 100644 --- a/core/modules/config_translation/config_translation.api.php +++ b/core/modules/config_translation/config_translation.api.php @@ -89,24 +89,5 @@ function hook_config_translation_info_alter(&$info) { } /** - * Alter config typed data definitions. - * - * Used to automatically generate translation forms, you can alter the typed - * data types representing each configuration schema type to change default - * labels or form element renderers. - * - * @param $definitions - * Associative array of configuration type definitions keyed by schema type - * names. The elements are themselves array with information about the type. - */ -function hook_config_schema_info_alter(&$definitions) { - // Enhance the text and date type definitions with classes to generate proper - // form elements in ConfigTranslationFormBase. Other translatable types will - // appear as a one line textfield. - $definitions['text']['form_element_class'] = '\Drupal\config_translation\FormElement\Textarea'; - $definitions['date_format']['form_element_class'] = '\Drupal\config_translation\FormElement\DateFormat'; -} - -/** * @} End of "addtogroup hooks". */ diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index 2eef874..f0b21a0 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -2833,6 +2833,25 @@ function hook_config_import_steps_alter(&$sync_steps, \Drupal\Core\Config\Config } /** + * Alter config typed data definitions. + * + * For example you can alter the typed data types representing each + * configuration schema type to change default labels or form element renderers + * used for configuration translation. + * + * @param $definitions + * Associative array of configuration type definitions keyed by schema type + * names. The elements are themselves array with information about the type. + */ +function hook_config_schema_info_alter(&$definitions) { + // Enhance the text and date type definitions with classes to generate proper + // form elements in ConfigTranslationFormBase. Other translatable types will + // appear as a one line textfield. + $definitions['text']['form_element_class'] = '\Drupal\config_translation\FormElement\Textarea'; + $definitions['date_format']['form_element_class'] = '\Drupal\config_translation\FormElement\DateFormat'; +} + +/** * @} End of "addtogroup hooks". */