You are here

public function AuditLogLogger::addEventSubscriber in Audit Log 8.2

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

Adds an event subscriber to the processing pipeline.

Parameters

\Drupal\audit_log\EventSubscriber\EventSubscriberInterface $event_subscriber: An audit log event event subscriber.

int $priority: A priority specification for the event subscriber.

Must be a positive integer.

Lower number event subscribers are processed before higher number event subscribers.

File

src/AuditLogLogger.php, line 59

Class

AuditLogLogger
Service for responding to audit log events.

Namespace

Drupal\audit_log

Code

public function addEventSubscriber(EventSubscriberInterface $event_subscriber, $priority = 0) {
  $this->entityEventEventSubscribers[$priority][] = $event_subscriber;
}