diff --git a/core/lib/Drupal/Core/Config/Schema/ConfigSchemaDiscovery.php b/core/lib/Drupal/Core/Config/Schema/ConfigSchemaDiscovery.php index 2477684..53330ec 100644 --- a/core/lib/Drupal/Core/Config/Schema/ConfigSchemaDiscovery.php +++ b/core/lib/Drupal/Core/Config/Schema/ConfigSchemaDiscovery.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\Plugin\Discovery\ConfigSchemaYamlDiscovery. + * Contains \Drupal\Core\Config\Schema\ConfigSchemaDiscovery. */ namespace Drupal\Core\Config\Schema; @@ -26,13 +26,13 @@ class ConfigSchemaDiscovery implements DiscoveryInterface { protected $schemaStorage; /** - * Construct a ConfigSchemaDiscovery object + * Constructs a ConfigSchemaDiscovery object. * - * @param $schemaStorage + * @param $schema_storage * The storage object to use for reading schema data. */ - function __construct(StorageInterface $schemaStorage) { - $this->schemaStorage = $schemaStorage; + function __construct(StorageInterface $schema_storage) { + $this->schemaStorage = $schema_storage; } /** diff --git a/core/lib/Drupal/Core/Config/TypedConfigManager.php b/core/lib/Drupal/Core/Config/TypedConfigManager.php index 7bbbc11..b520dd8 100644 --- a/core/lib/Drupal/Core/Config/TypedConfigManager.php +++ b/core/lib/Drupal/Core/Config/TypedConfigManager.php @@ -9,12 +9,9 @@ use Drupal\Component\Utility\NestedArray; use Drupal\Core\Cache\CacheBackendInterface; -use Drupal\Core\TypedData\TypedDataManager; - -// Schema discovery and decorators use Drupal\Core\Config\Schema\ConfigSchemaDiscovery; -use Drupal\Core\Plugin\Discovery\YamlDiscovery; use Drupal\Core\Plugin\Discovery\AlterDecorator; +use Drupal\Core\TypedData\TypedDataManager; /** * Manages config type plugins. @@ -56,7 +53,6 @@ public function __construct(StorageInterface $configStorage, StorageInterface $s $this->configStorage = $configStorage; $this->schemaStorage = $schemaStorage; $this->setCacheBackend($cache, 'typed_config_definitions'); - // Set discovery with alterdecorator. $this->discovery = new AlterDecorator(new ConfigSchemaDiscovery($schemaStorage), 'config_schema_info'); } diff --git a/core/modules/config_translation/config_translation.api.php b/core/modules/config_translation/config_translation.api.php index a7db185..20d7097 100644 --- a/core/modules/config_translation/config_translation.api.php +++ b/core/modules/config_translation/config_translation.api.php @@ -99,7 +99,7 @@ function hook_config_translation_info_alter(&$info) { * Associative array of configuration type definitions keyed by schema type * names. The elements are themselves array with information about the type. */ -function hook_config_translation_type_info_alter(&$definitions) { +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. diff --git a/core/modules/config_translation/config_translation.module b/core/modules/config_translation/config_translation.module index f95373c..9aa1b25 100644 --- a/core/modules/config_translation/config_translation.module +++ b/core/modules/config_translation/config_translation.module @@ -192,9 +192,9 @@ function config_translation_entity_operation(EntityInterface $entity) { } /** - * Implements hook_config_translation_type_info_alter(). + * Implements hook_config_schema_info_alter(). */ -function config_translation_config_translation_type_info_alter(&$definitions) { +function config_translation_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. diff --git a/core/modules/config_translation/src/Form/ConfigTranslationFormBase.php b/core/modules/config_translation/src/Form/ConfigTranslationFormBase.php index 5b6125a..a14c585 100644 --- a/core/modules/config_translation/src/Form/ConfigTranslationFormBase.php +++ b/core/modules/config_translation/src/Form/ConfigTranslationFormBase.php @@ -49,13 +49,6 @@ protected $localeStorage; /** - * The module handler to invoke the alter hook. - * - * @var \Drupal\Core\Extension\ModuleHandlerInterface - */ - protected $moduleHandler; - - /** * The mapper for configuration translation. * * @var \Drupal\config_translation\ConfigMapperInterface @@ -99,14 +92,11 @@ * The configuration mapper manager. * @param \Drupal\locale\StringStorageInterface $locale_storage * The translation storage object. - * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler - * The module handler to invoke the alter hook. */ - public function __construct(TypedConfigManagerInterface $typed_config_manager, ConfigMapperManagerInterface $config_mapper_manager, StringStorageInterface $locale_storage, ModuleHandlerInterface $module_handler, ConfigurableLanguageManagerInterface $language_manager) { + public function __construct(TypedConfigManagerInterface $typed_config_manager, ConfigMapperManagerInterface $config_mapper_manager, StringStorageInterface $locale_storage, ConfigurableLanguageManagerInterface $language_manager) { $this->typedConfigManager = $typed_config_manager; $this->configMapperManager = $config_mapper_manager; $this->localeStorage = $locale_storage; - $this->moduleHandler = $module_handler; $this->languageManager = $language_manager; } @@ -118,7 +108,6 @@ public static function create(ContainerInterface $container) { $container->get('config.typed'), $container->get('plugin.manager.config_translation.mapper'), $container->get('locale.storage'), - $container->get('module_handler'), $container->get('language_manager') ); } @@ -311,13 +300,6 @@ protected function buildConfigForm(Element $schema, $config_data, $base_config_d else { $definition = $element->getDataDefinition(); - // Invoke hook_config_translation_type_info_alter() implementations to - // alter the configuration types. - $definitions = array( - $definition['type'] => &$definition, - ); - $this->moduleHandler->alter('config_translation_type_info', $definitions); - // Create form element only for translatable items. if (!isset($definition['translatable']) || !isset($definition['type'])) { continue;