Class RulesController
Manages the building of a rules cache and is provides admin functions for
managing badges in the dashboard.
-
Gdn_Controller
-
RulesController
Methods summary
public
|
#
Initialize( )
May be used in the future.
May be used in the future.
Since
1.0
|
public static
array
|
#
GetRules( )
This checks the cache for current rule set and expires once a day. It loads
all php files in the rules folder and selects only those that implement the
'YagaRule' interface.
This checks the cache for current rule set and expires once a day. It loads
all php files in the rules folder and selects only those that implement the
'YagaRule' interface.
Returns
array Rules that are currently available to use. The class names are keys and the
friendly names are values.
|
public static
array
|
#
GetInteractionRules( )
This checks the cache for current rule set that can be triggered for a user
by another user. It loads all rules and selects only those that return true on
its Interacts() method.
This checks the cache for current rule set that can be triggered for a user
by another user. It loads all rules and selects only those that return true on
its Interacts() method.
Returns
array Rules that are currently available to use that are interactive.
|
public
|
#
GetCriteriaForm( string $RuleClass )
This creates a new rule object in a safe way and renders its criteria
form.
This creates a new rule object in a safe way and renders its criteria
form.
Parameters
- $RuleClass
string $RuleClass
|