function UserFloodControl::__construct

Same name in other branches
  1. 10 core/modules/user/src/UserFloodControl.php \Drupal\user\UserFloodControl::__construct()
  2. 11.x core/modules/user/src/UserFloodControl.php \Drupal\user\UserFloodControl::__construct()

Construct the UserFloodControl.

Parameters

\Drupal\Core\Flood\FloodInterface $flood: The flood service.

\Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher service.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack used to retrieve the current request.

File

core/modules/user/src/UserFloodControl.php, line 49

Class

UserFloodControl
User Flood Control service.

Namespace

Drupal\user

Code

public function __construct(FloodInterface $flood, EventDispatcherInterface $event_dispatcher, RequestStack $request_stack) {
    $this->flood = $flood;
    $this->eventDispatcher = $event_dispatcher;
    $this->requestStack = $request_stack;
}

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