Class RankModel
Describes ranks and their associated requirements/rewards
Events:
-
Gdn_Model
-
RankModel
Methods summary
public
|
#
__construct( )
Defines the related database table name.
Defines the related database table name.
|
public
DataSet
|
#
Get( )
Returns a list of all ranks
Returns a list of all ranks
Returns
DataSet
|
public
integer
|
#
GetCount( )
Gets the number of ranks currently specified in the database.
Gets the number of ranks currently specified in the database.
Returns
integer
|
public
DataSet
|
#
GetByID( integer $RankID )
Returns data for a specific rank
Returns data for a specific rank
Parameters
Returns
DataSet
|
public
mixed
|
#
GetHighestQualifyingRank( object $User )
Returns the highest rank a user can currently achieve
Returns the highest rank a user can currently achieve
Parameters
Returns
mixed NULL if no qualifying ranks are found, Rank object otherwise
|
public
array
|
#
GetPerks( integer $RankID )
Get a list of perks associated with the specified Rank ID
Get a list of perks associated with the specified Rank ID
Parameters
Returns
array
|
public
array
|
#
GetPerkRoleIDs( integer $RankID )
Returns all role IDs the specified rank confers as a perk
Returns all role IDs the specified rank confers as a perk
Parameters
Returns
array
|
public
|
#
Enable( integer $RankID, boolean $Enable )
Enable or disable a rank
Parameters
- $RankID
integer $RankID
- $Enable
boolean $Enable
|
public
boolean
|
#
Delete( integer $RankID )
Remove a rank and associated awards
Remove a rank and associated awards
Parameters
Returns
boolean
|
public
|
#
Set( integer $RankID, integer $UserID, boolean $Activity = FALSE )
Set a user's rank and record some activity if it was a promotion
Set a user's rank and record some activity if it was a promotion
Parameters
- $RankID
integer $RankID
- $UserID
integer $UserID This is the user that should get the award
- $Activity
boolean $Activity Whether or not to insert an activity record.
|
public
boolean
|
#
SaveSort( array $SortArray )
Updates the sort field for each rank in the sort array
Updates the sort field for each rank in the sort array
Parameters
- $SortArray
array $SortArray
Returns
boolean
|