You are here

public function Job::toArray in Advanced Queue 8

Returns the job as an array.

Return value

array The job.

File

src/Job.php, line 407

Class

Job
Represents a job.

Namespace

Drupal\advancedqueue

Code

public function toArray() {
  return [
    'id' => $this->id,
    'queue_id' => $this->queueId,
    'type' => $this->type,
    'payload' => $this->payload,
    'state' => $this->state,
    'message' => $this->message,
    'available' => $this->available,
    'processed' => $this->processed,
    'expires' => $this->expires,
  ];
}