Skip to content
Snippets Groups Projects

Use Typed Config Manager for Drupal 11

Closed ALEX BERRY requested to merge issue/responsive_menus-3490317:3490317-D11-2.0.x into 2.0.x
1 file
+ 6
3
Compare changes
  • Side-by-side
  • Inline
@@ -3,6 +3,7 @@
namespace Drupal\responsive_menus\Form;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\responsive_menus\ResponsiveMenusPluginManager;
@@ -20,13 +21,14 @@ class ResponsiveMenusAdminForm extends ConfigFormBase {
*
* @var \Drupal\responsive_menus\ResponsiveMenusPluginManager
*/
protected $pluginManager;
protected ResponsiveMenusPluginManager $pluginManager;
/**
* {@inheritdoc}
*/
public function __construct(ConfigFactoryInterface $config_factory, ResponsiveMenusPluginManager $plugin_manager) {
parent::__construct($config_factory);
public function __construct(ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config_manager, ResponsiveMenusPluginManager $plugin_manager) {
parent::__construct($config_factory, $typed_config_manager);
$this->pluginManager = $plugin_manager;
}
@@ -37,6 +39,7 @@ class ResponsiveMenusAdminForm extends ConfigFormBase {
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('config.typed'),
$container->get('plugin.manager.responsive_menus')
);
}
Loading