Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AccountSetEvent.php

class AccountSetEvent

Event fired when an account is set for the current session.

Hierarchy

  • class \Symfony\Contracts\EventDispatcher\Event implements \Psr\EventDispatcher\StoppableEventInterface
    • class \Drupal\Component\EventDispatcher\Event extends \Symfony\Contracts\EventDispatcher\Event
      • class \Drupal\Core\Session\AccountSetEvent extends \Drupal\Component\EventDispatcher\Event

Expanded class hierarchy of AccountSetEvent

File

core/lib/Drupal/Core/Session/AccountSetEvent.php, line 10

Namespace

Drupal\Core\Session
View source
final class AccountSetEvent extends Event {
    
    /**
     * The set account.
     *
     * @var \Drupal\Core\Session\AccountInterface
     */
    protected $account;
    
    /**
     * AccountSetEvent constructor.
     *
     * @param \Drupal\Core\Session\AccountInterface $account
     *   The set account.
     */
    public function __construct(AccountInterface $account) {
        $this->account = $account;
    }
    
    /**
     * Gets the account.
     *
     * @return \Drupal\Core\Session\AccountInterface
     *   The account.
     */
    public function getAccount() {
        return $this->account;
    }

}

Members

Title Sort descending Modifiers Object type Summary
AccountSetEvent::$account protected property The set account.
AccountSetEvent::getAccount public function Gets the account.
AccountSetEvent::__construct public function AccountSetEvent constructor.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal