You are here

public function PaymentForm::getPaymentDescription in Payment 8.2

Returns the description of the payment this plugin is of.

Parameters

string|\Drupal\Core\StringTranslation\TranslatableMarkup:

Overrides PaymentTypeInterface::getPaymentDescription

File

modules/payment_form/src/Plugin/Payment/Type/PaymentForm.php, line 104

Class

PaymentForm
The payment form field payment type.

Namespace

Drupal\payment_form\Plugin\Payment\Type

Code

public function getPaymentDescription() {
  $field_definitions = $this->entityFieldManager
    ->getFieldDefinitions($this
    ->getEntityTypeId(), $this
    ->getBundle());
  return isset($field_definitions[$this
    ->getFieldName()]) ? $field_definitions[$this
    ->getFieldName()]
    ->getLabel() : new TranslatableMarkup('Unavailable');
}