You are here

function PaymentStatusInfo::ancestors in Payment 7

Get this payment status's ancestors.

Return value

string[] The machine names of this status's ancestors.

File

./payment.classes.inc, line 1032
The API and related functions for executing and managing payments.

Class

PaymentStatusInfo
Payment status information.

Code

function ancestors() {
  $ancestors = array(
    $this->parent,
  );
  if ($this->parent) {
    $ancestors = array_merge($ancestors, payment_status_info($this->parent)
      ->ancestors());
  }
  return array_unique($ancestors);
}