class PaymentStatusInfo in Payment 7
Payment status information.
Hierarchy
- class \PaymentCommon- class \PaymentStatusInfo
 
Expanded class hierarchy of PaymentStatusInfo
File
- ./payment.classes.inc, line 996 
- The API and related functions for executing and managing payments.
View source
class PaymentStatusInfo extends PaymentCommon {
  /**
   * A US English human-readable plain text description.
   *
   * @var string
   */
  public $description = '';
  /**
   * This status's parent status.
   *
   * @var string
   */
  public $parent = NULL;
  /**
   * The status itself.
   *
   * @var string
   */
  public $status = '';
  /**
   * A US English human-readable plain text title.
   *
   * @var string
   */
  public $title = '';
  /**
   * Get this payment status's ancestors.
   *
   * @return string[]
   *   The machine names of this status's ancestors.
   */
  function ancestors() {
    $ancestors = array(
      $this->parent,
    );
    if ($this->parent) {
      $ancestors = array_merge($ancestors, payment_status_info($this->parent)
        ->ancestors());
    }
    return array_unique($ancestors);
  }
  /**
   * Get this payment status's children.
   *
   * @return string[]
   *   The machine names of this status's children.
   */
  function children() {
    $children = array();
    foreach (payment_statuses_info() as $status_info) {
      if ($status_info->parent == $this->status) {
        $children[] = $status_info->status;
      }
    }
    return $children;
  }
  /**
   * Get this payment status's descendants.
   *
   * @return string[]
   *   The machine names of this status's descendants.
   */
  function descendants() {
    $children = $this
      ->children();
    $descendants = $children;
    foreach ($children as $child) {
      $descendants = array_merge($descendants, payment_status_info($child)
        ->descendants());
    }
    return array_unique($descendants);
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| PaymentCommon:: | function | 2 | ||
| PaymentStatusInfo:: | public | property | A US English human-readable plain text description. | |
| PaymentStatusInfo:: | public | property | This status's parent status. | |
| PaymentStatusInfo:: | public | property | The status itself. | |
| PaymentStatusInfo:: | public | property | A US English human-readable plain text title. | |
| PaymentStatusInfo:: | function | Get this payment status's ancestors. | ||
| PaymentStatusInfo:: | function | Get this payment status's children. | ||
| PaymentStatusInfo:: | function | Get this payment status's descendants. | 
