You are here

class SocialAuthUserEvent in Social Auth 8

Class SocialAuthEvent.

Hierarchy

  • class \Drupal\social_auth\Event\SocialAuthUserEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of SocialAuthUserEvent

See also

\Drupal\social_auth\Event\SocialAuthEvents

1 file declares its use of SocialAuthUserEvent
SocialAuthUserManager.php in src/SocialAuthUserManager.php

File

src/Event/SocialAuthUserEvent.php, line 13

Namespace

Drupal\social_auth\Event
View source
class SocialAuthUserEvent extends Event {

  /**
   * The user.
   *
   * @var \Drupal\user\Entity\User
   */
  protected $user;

  /**
   * The plugin id dispatching this event.
   *
   * @var string
   */
  protected $pluginId;

  /**
   * Constructs a new SocialAuthEvent.
   *
   * @param \Drupal\user\Entity\User $user
   *   The user.
   * @param string $plugin_id
   *   The plugin Id dispatching this event.
   */
  public function __construct(User $user, $plugin_id) {
    $this->user = $user;
    $this->pluginId = $plugin_id;
  }

  /**
   * Gets the user.
   *
   * @return \Drupal\user\UserInterface
   *   The user.
   */
  public function getUser() {
    return $this->user;
  }

  /**
   * Gets the plugin id dispatching this event.
   *
   * @return string
   *   The plugin id.
   */
  public function getPluginId() {
    return $this->pluginId;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SocialAuthUserEvent::$pluginId protected property The plugin id dispatching this event.
SocialAuthUserEvent::$user protected property The user.
SocialAuthUserEvent::getPluginId public function Gets the plugin id dispatching this event.
SocialAuthUserEvent::getUser public function Gets the user.
SocialAuthUserEvent::__construct public function Constructs a new SocialAuthEvent.