You are here

protected function AuditLogStorage::sortStorageBackends in Audit Log 8

Same name and namespace in other branches
  1. 8.2 src/AuditLogStorage.php \Drupal\audit_log\AuditLogStorage::sortStorageBackends()

Sorts the available logging destinations by priority.

Return value

array The sorted array of logging destinations.

1 call to AuditLogStorage::sortStorageBackends()
AuditLogStorage::save in src/AuditLogStorage.php
Writes the audit event to each available logging destination.

File

src/AuditLogStorage.php, line 55

Class

AuditLogStorage
Writes audit log events to enabled logging destinations.

Namespace

Drupal\audit_log

Code

protected function sortStorageBackends() {
  $sorted = [];
  krsort($this->storage_backends);
  foreach ($this->storage_backends as $storage_backends) {
    $sorted = array_merge($sorted, $storage_backends);
  }
  return $sorted;
}