You are here

public function Payment::label in Commerce Core 8.2

Gets the label of the entity.

Return value

string|null The label of the entity, or NULL if there is no label defined.

Overrides ContentEntityBase::label

File

modules/payment/src/Entity/Payment.php, line 73

Class

Payment
Defines the payment entity class.

Namespace

Drupal\commerce_payment\Entity

Code

public function label() {

  // UIs should use the number formatter to show a more user-readable version.
  return $this
    ->getAmount()
    ->__toString();
}