You are here

public function ProtectionRuleInterface::hasProtection in User protect 8

Returns if the given protection is enabled on this rule.

Parameters

string $protection: The protection to check.

Return value

bool TRUE if the protection is enabled. FALSE otherwise.

1 method overrides ProtectionRuleInterface::hasProtection()
ProtectionRule::hasProtection in src/Entity/ProtectionRule.php
Returns if the given protection is enabled on this rule.

File

src/Entity/ProtectionRuleInterface.php, line 167

Class

ProtectionRuleInterface
Provides an interface defining a userprotect_rule entity.

Namespace

Drupal\userprotect\Entity

Code

public function hasProtection($protection);