AccountSetEvent.php 718 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace Drupal\Core\Session;
  3. use Symfony\Component\EventDispatcher\Event;
  4. /**
  5. * Event fired when an account is set for the current session.
  6. */
  7. final class AccountSetEvent extends Event {
  8. /**
  9. * The set account.
  10. *
  11. * @var \Drupal\Core\Session\AccountInterface
  12. */
  13. protected $account;
  14. /**
  15. * AccountSetEvent constructor.
  16. *
  17. * @param \Drupal\Core\Session\AccountInterface $account
  18. * The set account.
  19. */
  20. public function __construct(AccountInterface $account) {
  21. $this->account = $account;
  22. }
  23. /**
  24. * Gets the account.
  25. *
  26. * @return \Drupal\Core\Session\AccountInterface
  27. * The account.
  28. */
  29. public function getAccount() {
  30. return $this->account;
  31. }
  32. }