You are here

public function Transaction::getDescription in Transaction 8

Returns the transaction description.

Transactors compose the description based on the transaction data.

Parameters

bool $reset: Forces to recompose the transaction description.

Return value

string The transaction description.

Overrides TransactionInterface::getDescription

1 call to Transaction::getDescription()
Transaction::label in src/Entity/Transaction.php
Gets the label of the entity.

File

src/Entity/Transaction.php, line 507

Class

Transaction
Provides the transaction content entity.

Namespace

Drupal\transaction\Entity

Code

public function getDescription($reset = FALSE) {
  if ($reset || $this
    ->get('description')
    ->isEmpty()) {
    return $this
      ->transactorHandler()
      ->composeDescription($this);
  }
  return $this
    ->get('description')->value;
}