AccountSetEvent.php

Same filename and directory in other branches
  1. 9 core/lib/Drupal/Core/Session/AccountSetEvent.php
  2. 8.9.x core/lib/Drupal/Core/Session/AccountSetEvent.php
  3. 10 core/lib/Drupal/Core/Session/AccountSetEvent.php

Namespace

Drupal\Core\Session

File

core/lib/Drupal/Core/Session/AccountSetEvent.php

View source
<?php

namespace Drupal\Core\Session;

use Drupal\Component\EventDispatcher\Event;

/**
 * Event fired when an account is set for the current session.
 */
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;
    }

}

Classes

Title Deprecated Summary
AccountSetEvent Event fired when an account is set for the current session.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.