function UserpointsTransaction::setOperation in User Points 7.2
Set the operation string for this transaction.
A string that can identify this transaction. Can be used to provide a custom, translatable, optionally dynamic reason for this transaction in transaction listings. See hook_userpoints_info().
This typically indicates the reason for this transaction, e.g. the user commented, voted, logged in etc.
This should be understood as a machine name, e.g. mymodule_category_action.
Parameters
$operation: A string to identify this type of transaction.
Return value
File
- ./
userpoints.transaction.inc, line 439 - Contains the UserpointsTransaction and related classes.
Class
- UserpointsTransaction
- A Userpoints transaction.
Code
function setOperation($operation) {
$this
->checkChange();
$this->operation = $operation;
return $this;
}