You are here

public static function Drupal::flood in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal.php \Drupal::flood()
  2. 9 core/lib/Drupal.php \Drupal::flood()

Returns the flood instance.

Return value

\Drupal\Core\Flood\FloodInterface

3 calls to Drupal::flood()
DrupalTest::testFlood in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the flood() method.
FloodTest::testCleanUp in core/modules/system/tests/src/Kernel/System/FloodTest.php
Tests flood control mechanism clean-up.
system_cron in core/modules/system/system.module
Implements hook_cron().

File

core/lib/Drupal.php, line 520

Class

Drupal
Static Service Container wrapper.

Code

public static function flood() {
  return static::getContainer()
    ->get('flood');
}