You are here

protected function AuditLogStorage::sortStorageBackends in Audit Log 8.2

Same name and namespace in other branches
  1. 8 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->storageBackends);
  foreach ($this->storageBackends as $storage_backends) {
    $sorted = array_merge($sorted, $storage_backends);
  }
  return $sorted;
}