You are here

public function RateLimitGlobal::isRequestedEvent in RESTful 7.2

Only track the global limit for the current user if the variable is on.

Overrides RateLimitInterface::isRequestedEvent

File

src/Plugin/rate_limit/RateLimitGlobal.php, line 60
Contains \Drupal\restful\Plugin\rate_limit\RateLimitGlobal

Class

RateLimitGlobal
Class RateLimitGlobal @package Drupal\restful\Plugin\rate_limit

Namespace

Drupal\restful\Plugin\rate_limit

Code

public function isRequestedEvent(RequestInterface $request) {
  return $this
    ->getLimit() > 0;
}