You are here

public function AuditLogEvent::setEntity in Audit Log 8.2

Same name and namespace in other branches
  1. 8 src/AuditLogEvent.php \Drupal\audit_log\AuditLogEvent::setEntity()

Stores the entity that triggered the audit event.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity being modified.

Return value

AuditLogEventInterface The current instance of the object.

Overrides AuditLogEventInterface::setEntity

File

src/AuditLogEvent.php, line 81

Class

AuditLogEvent
Represents a single auditable event for logging.

Namespace

Drupal\audit_log

Code

public function setEntity(EntityInterface $entity) {
  $this->entity = $entity;
  return $this;
}