You are here

protected function UserpointsTransaction::checkChange in User Points 7.2

Checks if a change is allowed.

Parameters

$only_new: If TRUE, only allows changes if this transaction is new. Defaults to FALSE.

Throws

UserpointsChangeException

13 calls to UserpointsTransaction::checkChange()
UserpointsTransaction::setApproverUid in ./userpoints.transaction.inc
Set the user who approved this transaction.
UserpointsTransaction::setDescription in ./userpoints.transaction.inc
Add a description to this transaction.
UserpointsTransaction::setEntity in ./userpoints.transaction.inc
Define the referenced entity.
UserpointsTransaction::setExpired in ./userpoints.transaction.inc
Marks a transaction as expired.
UserpointsTransaction::setExpiryDate in ./userpoints.transaction.inc
Set the expiration date of a transaction.

... See full list

File

./userpoints.transaction.inc, line 793
Contains the UserpointsTransaction and related classes.

Class

UserpointsTransaction
A Userpoints transaction.

Code

protected function checkChange($only_new = FALSE) {
  if ($this
    ->isReadOnly($only_new)) {
    $this
      ->abort();
    throw new UserpointsChangeException(t('This transaction is saved and approved or declined and can not be changed.'));
  }
}