Skip to content
Snippets Groups Projects

Issue #3508023: Fix for ConfigFormBase::__construct() error

1 file
+ 6
2
Compare changes
  • Side-by-side
  • Inline
@@ -3,6 +3,7 @@
namespace Drupal\content_model_documentation\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;
@@ -25,11 +26,13 @@ class ContentModelDocumentationConfigForm extends ConfigFormBase {
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The factory for configuration objects.
* @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config_manager
* The typed config manager.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler
* The module handler for determining which modules are installed.
*/
public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $moduleHandler) {
parent::__construct($config_factory);
public function __construct(ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config_manager, ModuleHandlerInterface $moduleHandler) {
parent::__construct($config_factory, $typed_config_manager);
$this->moduleHandler = $moduleHandler;
}
@@ -39,6 +42,7 @@ class ContentModelDocumentationConfigForm extends ConfigFormBase {
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('config.typed'),
$container->get('module_handler')
);
}
Loading