You are here

public function Transaction::getResultMessage in Transaction 8

Gets the execution result message.

Transactors compose the result message based on the result code.

Parameters

bool $reset: Forces to recompose the result message.

Return value

string The execution result message. FALSE if transaction execution was never called.

Overrides TransactionInterface::getResultMessage

File

src/Entity/Transaction.php, line 394

Class

Transaction
Provides the transaction content entity.

Namespace

Drupal\transaction\Entity

Code

public function getResultMessage($reset = FALSE) {
  if ($reset || $this
    ->get('result_message')
    ->isEmpty()) {
    return $this
      ->transactorHandler()
      ->composeResultMessage($this);
  }
  return $this
    ->get('result_message')->value;
}