public function PaymentReference::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_reference/ src/ Plugin/ Payment/ Type/ PaymentReference.php, line 120
Class
- PaymentReference
- The payment reference field payment type.
Namespace
Drupal\payment_reference\Plugin\Payment\TypeCode
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');
}