Skip to content
Snippets Groups Projects

Issue #3490818: Fix Drupal 11 compatibility issues

1 file
+ 6
2
Compare changes
  • Side-by-side
  • Inline
@@ -4,6 +4,7 @@ namespace Drupal\user_register_notify\Form;
use Drupal\Component\Utility\EmailValidatorInterface;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\token\TreeBuilder;
@@ -35,13 +36,15 @@ class UserRegisterNotifyAdminSettingsForm extends ConfigFormBase {
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The factory for configuration objects.
* @param \Drupal\Core\Config\TypedConfigManagerInterface $typedConfigManager
* The typed config manager.
* @param \Drupal\Component\Utility\EmailValidatorInterface $mail_validator
* The mail validator instance.
* @param \Drupal\token\TreeBuilder $token_tree_builder
* The token tree builder instance.
*/
public function __construct(ConfigFactoryInterface $config_factory, EmailValidatorInterface $mail_validator, TreeBuilder $token_tree_builder) {
parent::__construct($config_factory);
public function __construct(ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typedConfigManager, EmailValidatorInterface $mail_validator, TreeBuilder $token_tree_builder) {
parent::__construct($config_factory, $typedConfigManager);
$this->mailValidator = $mail_validator;
$this->tokenTreeBuilder = $token_tree_builder;
}
@@ -52,6 +55,7 @@ class UserRegisterNotifyAdminSettingsForm extends ConfigFormBase {
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('config.typed'),
$container->get('email.validator'),
$container->get('token.tree_builder'),
);
Loading