You are here

public function Transaction::setExecutionSequence in Transaction 8

Sets the execution sequence number.

Parameters

int|null $execution_sequence: The execution sequence number, NULL to unset the existing value.

Return value

\Drupal\transaction\TransactionInterface The called transaction.

Throws

\InvalidArgumentException When the sequence number is lower than 1.

Overrides TransactionInterface::setExecutionSequence

File

src/Entity/Transaction.php, line 295

Class

Transaction
Provides the transaction content entity.

Namespace

Drupal\transaction\Entity

Code

public function setExecutionSequence($execution_sequence) {
  if ($execution_sequence !== NULL && $execution_sequence < 1) {
    throw new \InvalidArgumentException('The execution sequence number must be greater than 0.');
  }
  $this
    ->set('execution_sequence', $execution_sequence);
  return $this;
}