Skip to content
Snippets Groups Projects
Commit e9cb3087 authored by Cor's avatar Cor Committed by Christopher C. Wells
Browse files

Issue #3476315 by oostie, sarwan_verma: Error on configuration form on Drupal 11

parent fa6c397e
No related branches found
No related tags found
1 merge request!8Update JsonApiImageStylesAdminForm.php - Added the Typed config manager as an depdency injection.
Pipeline #291419 passed with warnings
......@@ -3,6 +3,7 @@
namespace Drupal\jsonapi_image_styles\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;
......@@ -28,8 +29,11 @@ class JsonApiImageStylesAdminForm extends ConfigFormBase {
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* Entity type manager.
*/
public function __construct(ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager) {
parent::__construct($config_factory);
public function __construct(
ConfigFactoryInterface $configFactory,
TypedConfigManagerInterface $typedConfigManager,
EntityTypeManagerInterface $entity_type_manager) {
parent::__construct($configFactory, $typedConfigManager);
$this->entityTypeManager = $entity_type_manager;
}
......@@ -39,6 +43,7 @@ public function __construct(ConfigFactoryInterface $config_factory, EntityTypeMa
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('config.typed'),
$container->get('entity_type.manager')
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment