You are here

public function Transaction::getDetails in Transaction 8

Returns the transaction details.

Transactors compose datails based on the transaction data.

Parameters

bool $reset: Forces to recompose the transaction details.

Return value

string[] An array with details.

Overrides TransactionInterface::getDetails

File

src/Entity/Transaction.php, line 518

Class

Transaction
Provides the transaction content entity.

Namespace

Drupal\transaction\Entity

Code

public function getDetails($reset = FALSE) {
  if ($reset) {
    return $this
      ->transactorHandler()
      ->composeDetails($this);
  }
  $details = [];
  foreach ($this
    ->get('details')
    ->getValue() as $detail_value) {
    $details[] = $detail_value['value'];
  }
  return $details;
}