public function AuditLogEvent::setEntity in Audit Log 8
Same name and namespace in other branches
- 8.2 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_logCode
public function setEntity(EntityInterface $entity) {
$this->entity = $entity;
return $this;
}