Class DiscussionCount
This rule awards badges based on a user's discussion count
-
DiscussionCount
implements
YagaRule
Methods summary
public
integer
|
#
Award( mixed $Sender, UserObject $User, stdClass $Criteria )
This performs the grunt work of an award rule. Given an expected criteria, it
determines if a specific user meets muster.
This performs the grunt work of an award rule. Given an expected criteria, it
determines if a specific user meets muster.
Parameters
- $Sender
mixed $Sender The object calling the award method.
- $User
UserObject $User the user object of the calling user
- $Criteria
stdClass $Criteria This is a standard object with properties that match the criteria that
were previously rendered
Returns
integer Represents the user that gets the award criteria. You may use True as a shortcut
to award the user that did the check. False will not award any user
Implementation of
|
public
string
|
#
Form( Gdn_Form $Form )
Returns the needed criteria form for this rule's criteria.
Returns the needed criteria form for this rule's criteria.
Parameters
Returns
string The fully rendered form.
Implementation of
|
public
|
#
Validate( array $Criteria, Gdn_Form $Form )
This validates the submitted criteria and does what it wants with the
form
This validates the submitted criteria and does what it wants with the
form
Parameters
- $Criteria
array $Criteria
- $Form
Gdn_Form $Form
Implementation of
|
public
string
|
#
Hooks( )
This determines what hook the rule should be checked on.
This determines what hook the rule should be checked on.
Returns
string The hook name to fire our calculations on
Implementation of
|
public
string
|
#
Description( )
Returns a string representing the in depth description of how to use this
rule.
Returns a string representing the in depth description of how to use this
rule.
Returns
string The description
Implementation of
|
public
string
|
#
Name( )
Returns a string representing a user friendly name of this rule.
Returns a string representing a user friendly name of this rule.
Returns
string Name shown on forms
Implementation of
|
public
boolean
|
#
Interacts( )
Returns a bool representing whether the Award function can award a user other
than the calling user. Rules that depend on interaction should return true.
Returns a bool representing whether the Award function can award a user other
than the calling user. Rules that depend on interaction should return true.
Returns
boolean Whether or not interactions need to be checked
Implementation of
|