Overview

Packages

  • None
  • Yaga

Classes

  • ActedModel
  • ActionController
  • ActionModel
  • AwardCombo
  • BadgeAwardModel
  • BadgeController
  • BadgeModel
  • BadgesController
  • BadgesModule
  • BestController
  • BestFilterModule
  • CakeDayPost
  • CommentCount
  • CommentMarathon
  • DiscussionBodyLength
  • DiscussionCategory
  • DiscussionCount
  • DiscussionPageCount
  • HasMentioned
  • HolidayVisit
  • LeaderBoardModule
  • LengthOfService
  • ManualAward
  • NecroPost
  • NewbieComment
  • PhotoExists
  • PostCount
  • PostReactions
  • QnAAnserCount
  • RankController
  • RankModel
  • ReactController
  • ReactionCount
  • ReactionModel
  • ReflexComment
  • RulesController
  • SocialConnection
  • Yaga
  • YagaController
  • YagaHooks

Interfaces

  • YagaRule
  • Overview
  • Package
  • Class
  • Tree
  • Todo
  • Download

Class QnAAnserCount

This rule awards badges based on a user's answer count from the QnA plugin

QnAAnserCount implements YagaRule
Package: Yaga
Author: Zachary Doll
Since: 0.5
Located at library/rules/class.qnaanswercount.php
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

YagaRule::Award()
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

$Form
Gdn_Form
$Form

Returns

string
The fully rendered form.

Implementation of

YagaRule::Form()
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

YagaRule::Validate()
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

YagaRule::Hooks()
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

YagaRule::Description()
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

YagaRule::Name()
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

YagaRule::Interacts()
Yaga API documentation generated by ApiGen 2.8.0