Skip to content
Snippets Groups Projects
Commit d3dd9ac2 authored by kalash jain's avatar kalash jain Committed by Julian Pustkuchen
Browse files

Issue #3494293 by kalash-j, anybody: ArgumentCountError: Too few arguments to...

Issue #3494293 by kalash-j, anybody: ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct() in Drupal 11
parent 11e1f140
No related branches found
No related tags found
1 merge request!25Issue #3494293 by kalash: fixed the argument issue.
Pipeline #377807 passed with warnings
......@@ -3,6 +3,7 @@
namespace Drupal\protected_forms\Form;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
......@@ -26,6 +27,7 @@ class ProtectedFormsForm extends ConfigFormBase {
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('config.typed'),
$container->get('module_handler')
);
}
......@@ -35,11 +37,13 @@ class ProtectedFormsForm extends ConfigFormBase {
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The factory for configuration objects.
* @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config
* The typed config manager.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler
* The moduler handler.
* The module handler.
*/
public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $moduleHandler) {
parent::__construct($config_factory);
public function __construct(ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config, ModuleHandlerInterface $moduleHandler) {
parent::__construct($config_factory, $typed_config);
$this->moduleHandler = $moduleHandler;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment