Commit f737942b authored by catch's avatar catch
Browse files

Issue #3101138 by andypost, pratik_kamble, kishor_kolekar, alexpott:...

Issue #3101138 by andypost, pratik_kamble, kishor_kolekar, alexpott: UpdateSettingsForm should call parent constructor
parent 5b657b15
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
namespace Drupal\update; namespace Drupal\update;
use Drupal\Component\Utility\EmailValidatorInterface;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\Core\Url; use Drupal\Core\Url;
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
...@@ -23,23 +22,13 @@ class UpdateSettingsForm extends ConfigFormBase implements ContainerInjectionInt ...@@ -23,23 +22,13 @@ class UpdateSettingsForm extends ConfigFormBase implements ContainerInjectionInt
*/ */
protected $emailValidator; protected $emailValidator;
/**
* Constructs a new UpdateSettingsForm.
*
* @param \Drupal\Component\Utility\EmailValidatorInterface $email_validator
* The email validator.
*/
public function __construct(EmailValidatorInterface $email_validator) {
$this->emailValidator = $email_validator;
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public static function create(ContainerInterface $container) { public static function create(ContainerInterface $container) {
return new static( $instance = parent::create($container);
$container->get('email.validator') $instance->emailValidator = $container->get('email.validator');
); return $instance;
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment