user_email_verification-8.x-1.0/src/Event/UserEmailVerificationEcaBaseEvent.php
src/Event/UserEmailVerificationEcaBaseEvent.php
<?php
namespace Drupal\user_email_verification\Event;
use Drupal\user\UserInterface;
use Symfony\Contracts\EventDispatcher\Event;
/**
* Abstract base class for User Email Verification related ECA events.
*
* @internal
* This class is not meant to be used as a public API. It is subject for name
* change or may be removed completely, also on minor version updates.
*
* @package Drupal\user_email_verification\Event
*/
abstract class UserEmailVerificationEcaBaseEvent extends Event implements UserEmailVerificationEcaBaseEventInterface {
/**
* The user for the current event.
*
* @var \Drupal\user\UserInterface
*/
protected UserInterface $user;
/**
* User Email Verification base event class constructor.
*
* @param \Drupal\user\UserInterface $user
* The user for the current event.
*/
public function __construct(UserInterface $user) {
$this->user = $user;
}
/**
* {@inheritdoc}
*/
public function getUser(): UserInterface {
return $this->user;
}
}
