You are here

public function PaymentMethodManager::listOptions in Ubercart 8.4

Populates a key-value pair of available payment methods.

Return value

array An array of payment method labels, keyed by ID.

File

payment/uc_payment/src/Plugin/PaymentMethodManager.php, line 54

Class

PaymentMethodManager
Manages discovery and instantiation of payment methods.

Namespace

Drupal\uc_payment\Plugin

Code

public function listOptions() {
  $options = [];
  foreach ($this
    ->getDefinitions() as $key => $definition) {
    $options[$key] = $definition['name'];
  }
  return $options;
}