public function ProtectionRuleInterface::setBypassRoles in User protect 8
Sets the list of roles that may bypass this protection rule.
Parameters
array $roles: The roles that may bypass this protection rule.
Return value
\Drupal\userprotect\Entity\ProtectionRuleInterface The called protection rule entity.
1 method overrides ProtectionRuleInterface::setBypassRoles()
- ProtectionRule::setBypassRoles in src/
Entity/ ProtectionRule.php - Sets the list of roles that may bypass this protection rule.
File
- src/
Entity/ ProtectionRuleInterface.php, line 135
Class
- ProtectionRuleInterface
- Provides an interface defining a userprotect_rule entity.
Namespace
Drupal\userprotect\EntityCode
public function setBypassRoles(array $roles);