You are here

public function ProtectionRuleInterface::setProtectedEntityTypeId in User protect 8

Sets the protected entity type id.

Parameters

string $entity_type_id: ID of the entity type that should be protected.

Return value

\Drupal\userprotect\Entity\ProtectionRuleInterface The class instance this method is called on.

Throws

\InvalidArgumentException Thrown if $entity_type_id is invalid.

1 method overrides ProtectionRuleInterface::setProtectedEntityTypeId()
ProtectionRule::setProtectedEntityTypeId in src/Entity/ProtectionRule.php
Sets the protected entity type id.

File

src/Entity/ProtectionRuleInterface.php, line 34

Class

ProtectionRuleInterface
Provides an interface defining a userprotect_rule entity.

Namespace

Drupal\userprotect\Entity

Code

public function setProtectedEntityTypeId($entity_type_id);