You are here

public function PaymentStatusManager::hasAncestor in Payment 8.2

Checks if a status has a given other status as one of its ancestors.

Parameters

string $plugin_id:

string $ancestor_plugin_id: The payment status plugin ID to check against.

Return value

boolean

Overrides PaymentStatusManagerInterface::hasAncestor

1 call to PaymentStatusManager::hasAncestor()
PaymentStatusManager::isOrHasAncestor in src/Plugin/Payment/Status/PaymentStatusManager.php
Checks if the status is equal to a given other status or has it one of its ancestors.

File

src/Plugin/Payment/Status/PaymentStatusManager.php, line 141

Class

PaymentStatusManager
Manages discovery and instantiation of payment status plugins.

Namespace

Drupal\payment\Plugin\Payment\Status

Code

public function hasAncestor($plugin_id, $ancestor_plugin_id) {
  return in_array($ancestor_plugin_id, $this
    ->getAncestors($plugin_id));
}