diff --git a/src/Form/SettingsForm.php b/src/Form/SettingsForm.php index 2a1d46113d06372e29278a0a640790456baeb9da..58789ad6f56f42418533d80bcf7229b69aa1ef5d 100644 --- a/src/Form/SettingsForm.php +++ b/src/Form/SettingsForm.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Drupal\bootstrap_simple_carousel\Form; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Config\TypedConfigManagerInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Form\FormStateInterface; @@ -33,19 +34,29 @@ class SettingsForm extends ConfigFormBase { * * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * Config factory. + * @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config_manager + * Typed config manager. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager * Entity type manager. */ - public function __construct(ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager) { + public function __construct( + ConfigFactoryInterface $config_factory, + TypedConfigManagerInterface $typed_config_manager, + EntityTypeManagerInterface $entity_type_manager + ) { $this->imageStyleService = $entity_type_manager->getStorage('image_style'); - parent::__construct($config_factory); + parent::__construct($config_factory, $typed_config_manager); } /** * {@inheritdoc} */ public static function create(ContainerInterface $container): self { - return new static($container->get('config.factory'), $container->get('entity_type.manager')); + return new static( + $container->get('config.factory'), + $container->get('config.typed'), + $container->get('entity_type.manager') + ); } /**