You are here

final class UserCancelMethodsAlterEvent in Hook Event Dispatcher 8.2

Same name and namespace in other branches
  1. 3.x modules/user_event_dispatcher/src/Event/User/UserCancelMethodsAlterEvent.php \Drupal\user_event_dispatcher\Event\User\UserCancelMethodsAlterEvent

Class UserFormatNameAlterEvent.

Hierarchy

Expanded class hierarchy of UserCancelMethodsAlterEvent

2 files declare their use of UserCancelMethodsAlterEvent
UserEventTest.php in modules/user_event_dispatcher/tests/src/Unit/User/UserEventTest.php
user_event_dispatcher.module in modules/user_event_dispatcher/user_event_dispatcher.module
User event dispatcher submodule.

File

modules/user_event_dispatcher/src/Event/User/UserCancelMethodsAlterEvent.php, line 12

Namespace

Drupal\user_event_dispatcher\Event\User
View source
final class UserCancelMethodsAlterEvent extends Event implements EventInterface {

  /**
   * Array containing user account cancellation methods, keyed by method id.
   *
   * @var array
   */
  private $methods;

  /**
   * UserCancelMethodsAlterEvent constructor.
   *
   * @param array $methods
   *   Array containing user account cancellation methods, keyed by method id.
   */
  public function __construct(array &$methods) {
    $this->methods =& $methods;
  }

  /**
   * Get methods by reference.
   *
   * @return array
   *   Methods.
   */
  public function &getMethods() : array {
    return $this->methods;
  }

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

}

Members

Namesort descending Modifiers Type Description Overrides
UserCancelMethodsAlterEvent::$methods private property Array containing user account cancellation methods, keyed by method id.
UserCancelMethodsAlterEvent::getDispatcherType public function Get the dispatcher type. Overrides EventInterface::getDispatcherType
UserCancelMethodsAlterEvent::getMethods public function Get methods by reference.
UserCancelMethodsAlterEvent::__construct public function UserCancelMethodsAlterEvent constructor.