Skip to content
Snippets Groups Projects

Fix Too few arguments Issue.

1 file
+ 14
3
Compare changes
  • Side-by-side
  • Inline
+ 14
3
@@ -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')
);
}
/**
Loading