You are here

final class UserLoginEvent in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 modules/user_event_dispatcher/src/Event/User/UserLoginEvent.php \Drupal\user_event_dispatcher\Event\User\UserLoginEvent

Class UserLoginEvent.

Hierarchy

Expanded class hierarchy of UserLoginEvent

1 file declares its use of UserLoginEvent
user_event_dispatcher.module in modules/user_event_dispatcher/user_event_dispatcher.module
User event dispatcher submodule.

File

modules/user_event_dispatcher/src/Event/User/UserLoginEvent.php, line 13

Namespace

Drupal\user_event_dispatcher\Event\User
View source
final class UserLoginEvent extends Event implements EventInterface {

  /**
   * Account.
   *
   * @var \Drupal\Core\Session\AccountInterface
   */
  private $account;

  /**
   * UserLoginEvent constructor.
   *
   * @param \Drupal\Core\Session\AccountInterface $account
   *   Account.
   */
  public function __construct(AccountInterface $account) {
    $this->account = $account;
  }

  /**
   * Get the account.
   *
   * @return \Drupal\Core\Session\AccountInterface
   *   Account.
   */
  public function getAccount() : AccountInterface {
    return $this->account;
  }

  /**
   * Get the dispatcher type.
   *
   * @return string
   *   The dispatcher type.
   */
  public function getDispatcherType() : string {
    return HookEventDispatcherInterface::USER_LOGIN;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UserLoginEvent::$account private property Account.
UserLoginEvent::getAccount public function Get the account.
UserLoginEvent::getDispatcherType public function Get the dispatcher type. Overrides EventInterface::getDispatcherType
UserLoginEvent::__construct public function UserLoginEvent constructor.