Issue #3101138 by andypost, pratik_kamble, kishor_kolekar, alexpott: UpdateSettingsForm should call parent constructor
parent
5b657b15b8
commit
f737942bf9
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Drupal\update;
|
||||
|
||||
use Drupal\Component\Utility\EmailValidatorInterface;
|
||||
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
|
||||
use Drupal\Core\Url;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
@ -23,23 +22,13 @@ class UpdateSettingsForm extends ConfigFormBase implements ContainerInjectionInt
|
|||
*/
|
||||
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}
|
||||
*/
|
||||
public static function create(ContainerInterface $container) {
|
||||
return new static(
|
||||
$container->get('email.validator')
|
||||
);
|
||||
$instance = parent::create($container);
|
||||
$instance->emailValidator = $container->get('email.validator');
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue