Methods summary
public
|
#
__construct( )
Defines the related database table name.
Defines the related database table name.
|
public
integer
|
#
GetCount( integer $BadgeID = FALSE )
Gets the number of badges that have been awarded with a specific ID
Gets the number of badges that have been awarded with a specific ID
Parameters
Returns
integer
|
public
dataset
|
#
GetRecent( integer $BadgeID, integer $Limit = 15 )
Gets recently awarded badges with a specific ID
Gets recently awarded badges with a specific ID
Parameters
- $BadgeID
integer $BadgeID
- $Limit
integer $Limit
Returns
dataset
|
public
|
#
Award( integer $BadgeID, integer $UserID, integer $InsertUserID = NULL, string $Reason = '' )
Award a badge to a user and record some activity
Award a badge to a user and record some activity
Parameters
- $BadgeID
integer $BadgeID
- $UserID
integer $UserID This is the user that should get the award
- $InsertUserID
integer $InsertUserID This is the user that gave the award
- $Reason
string $Reason This is the reason the giver gave with the award
|
public
integer
|
#
Exists( integer $UserID, integer $BadgeID )
Returns how many badges the user has of this particular id. It should only
ever be 1 or zero.
Returns how many badges the user has of this particular id. It should only
ever be 1 or zero.
Parameters
- $UserID
integer $UserID
- $BadgeID
integer $BadgeID
Returns
integer
|
public
mixed
|
#
GetByUser( integer $UserID, string $DataType = DATASET_TYPE_ARRAY )
Returns the badges a user has already received
Returns the badges a user has already received
Parameters
- $UserID
integer $UserID
- $DataType
string $DataType
Returns
mixed
|
public
DataSet
|
#
GetUnobtained( integer $UserID )
Returns the list of unobtained but enabled badges for a specific user
Returns the list of unobtained but enabled badges for a specific user
Parameters
Returns
DataSet
|
public
boolean
|
#
Counts( string $Column, integer $UserID = NULL )
Used by the DBA controller to update the denormalized badge count on the user
table via dba/counts
Used by the DBA controller to update the denormalized badge count on the user
table via dba/counts
Parameters
- $Column
string $Column
- $UserID
integer $UserID
Returns
boolean
Throws
Gdn_UserException
|