You are here

final class UserCancelEvent in Hook Event Dispatcher 8

Class UserCancelEvent.

Hierarchy

Expanded class hierarchy of UserCancelEvent

1 file declares its use of UserCancelEvent
hook_event_dispatcher.module in ./hook_event_dispatcher.module
Hook event dispatcher module.

File

src/Event/User/UserCancelEvent.php, line 13

Namespace

Drupal\hook_event_dispatcher\Event\User
View source
final class UserCancelEvent extends Event implements EventInterface {

  /**
   * The array of form values submitted by the user.
   *
   * @var array
   */
  private $edit;

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

  /**
   * The account cancellation method.
   *
   * @var string
   */
  private $method;

  /**
   * UserCancelEvent constructor.
   *
   * @param array $edit
   *   The array of form values submitted by the user.
   * @param \Drupal\Core\Session\AccountInterface $account
   *   Account.
   * @param string $method
   *   The account cancellation method.
   */
  public function __construct(array $edit, AccountInterface $account, $method) {
    $this->edit = $edit;
    $this->account = $account;
    $this->method = $method;
  }

  /**
   * Get edit array.
   *
   * @return array
   *   The array of form values submitted by the user.
   */
  public function getEdit() {
    return $this->edit;
  }

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

  /**
   * Get method.
   *
   * @return string
   *   The account cancellation method.
   */
  public function getMethod() {
    return $this->method;
  }

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

}

Members

Namesort descending Modifiers Type Description Overrides
UserCancelEvent::$account private property Account.
UserCancelEvent::$edit private property The array of form values submitted by the user.
UserCancelEvent::$method private property The account cancellation method.
UserCancelEvent::getAccount public function Get the account.
UserCancelEvent::getDispatcherType public function Get the dispatcher type. Overrides EventInterface::getDispatcherType
UserCancelEvent::getEdit public function Get edit array.
UserCancelEvent::getMethod public function Get method.
UserCancelEvent::__construct public function UserCancelEvent constructor.