You are here

public function ProtectionRule::setProtectedEntityId in User protect 8

Gets the protected entity id.

Parameters

string|int $entity_id: ID of the entity that should be protected.

Return value

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

Overrides ProtectionRuleInterface::setProtectedEntityId

File

src/Entity/ProtectionRule.php, line 163

Class

ProtectionRule
Defines the Protection rule entity.

Namespace

Drupal\userprotect\Entity

Code

public function setProtectedEntityId($entity_id) {
  $this->protectedEntityId = $entity_id;
  return $this;
}