diff --git a/composer.json b/composer.json index 673daa9..5c8f5e9 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,8 @@ "type": "drupal-module", "license": "GPL-2.0-or-later", "require": { - "drupal/core": "^9.0 || ^10.0" + "drupal/core": "^9.0 || ^10.0 || ^11", + "drupal/ds": "^3.23" }, "minimum-stability": "dev", "prefer-stable": true diff --git a/display_field_copy.info.yml b/display_field_copy.info.yml index 3abb72f..e6c64d4 100644 --- a/display_field_copy.info.yml +++ b/display_field_copy.info.yml @@ -1,7 +1,7 @@ name: Display Field Copy type: module description: Copies the display so it can be shown multiple times on a page. -core_version_requirement: ^9 || ^10 +core_version_requirement: ^9 || ^10 || ^11 package: Display Suite dependencies: - ds:ds diff --git a/src/Form/DisplayFieldCopyForm.php b/src/Form/DisplayFieldCopyForm.php index 36b7592..63a7e62 100644 --- a/src/Form/DisplayFieldCopyForm.php +++ b/src/Form/DisplayFieldCopyForm.php @@ -4,6 +4,7 @@ namespace Drupal\display_field_copy\Form; use Drupal\Core\Cache\CacheTagsInvalidatorInterface; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Config\TypedConfigManagerInterface; use Drupal\Core\Entity\ContentEntityTypeInterface; use Drupal\Core\Entity\EntityFieldManagerInterface; use Drupal\Core\Entity\EntityTypeBundleInfoInterface; @@ -46,9 +47,10 @@ class DisplayFieldCopyForm extends FieldFormBase { EntityTypeManagerInterface $entity_type_manager, CacheTagsInvalidatorInterface $cache_invalidator, ModuleHandlerInterface $module_handler, + TypedConfigManagerInterface $typed_config_manager, EntityFieldManagerInterface $entity_field_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info) { - parent::__construct($config_factory, $entity_type_manager, $cache_invalidator, $module_handler); + parent::__construct($config_factory, $entity_type_manager, $cache_invalidator, $module_handler, $typed_config_manager); $this->entityFieldManager = $entity_field_manager; $this->entityTypeBundleInfo = $entity_type_bundle_info; } @@ -62,6 +64,7 @@ class DisplayFieldCopyForm extends FieldFormBase { $container->get('entity_type.manager'), $container->get('cache_tags.invalidator'), $container->get('module_handler'), + $container->get('config.typed'), $container->get('entity_field.manager'), $container->get('entity_type.bundle.info') );