Skip to content
Snippets Groups Projects
Commit a8ddc1cf authored by Ben Voynick's avatar Ben Voynick
Browse files

Issue #3433923 by bvoynick: Drupal 11 compatibility

parent 37cd278f
No related branches found
Tags 1.0.1
1 merge request!5Issue #3433923 by bvoynick: Drupal 11 compatibility
name: Picture Everywhere
type: module
description: Standardizes Drupal image rendering to always use a <picture> element.
core_version_requirement: ^9.4 || ^10
core_version_requirement: ^9.4 || ^10 || ^11
php: 8.0
package: Media
configure: picture_everywhere.settings
......
......@@ -42,7 +42,15 @@ class SettingsForm extends ConfigFormBase {
ModuleHandlerInterface $module_handler,
ThemeHandlerInterface $theme_handler,
) {
parent::__construct($config_factory);
// TODO: once this module requires a minimum of Drupal 10.2 or later, this
// conditional can be removed.
if (version_compare(\Drupal::VERSION, '10.2', '>=')) {
$typed_config_manager = \Drupal::service('config.typed');
parent::__construct($config_factory, $typed_config_manager);
}
else {
parent::__construct($config_factory);
}
$this->moduleHandler = $module_handler;
$this->themeHandler = $theme_handler;
......
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