You are here

public function LogEntry::setData in Ultimate Cron 8.2

Set current log entry data from an associative array.

Parameters

array $data: Log entry data.

File

src/Logger/LogEntry.php, line 82

Class

LogEntry
Class for Ultimate Cron log entries.

Namespace

Drupal\ultimate_cron\Logger

Code

public function setData($data) {
  foreach ($this->log_entry_fields as $field) {
    if (array_key_exists($field, $data)) {
      $this->{$field} = $data[$field];
    }
  }
}