function IpIsBanned::__construct

Constructs a IpIsBanned object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\ban\BanIpManagerInterface $ban_manager: The ban manager.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The corresponding request stack.

Overrides ConditionPluginBase::__construct

File

src/Plugin/Condition/IpIsBanned.php, line 72

Class

IpIsBanned
Provides an 'IP address is blocked' condition.

Namespace

Drupal\rules\Plugin\Condition

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, BanIpManagerInterface $ban_manager, RequestStack $request_stack) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->banManager = $ban_manager;
    $this->requestStack = $request_stack;
}