GamificationRules Class Reference

Inheritance diagram for GamificationRules:
AccountGamificationRules CampaignGamificationRules CommentGamificationRules ContactGamificationRules ConversationGamificationRules EmailTemplateGamificationRules MarketingListGamificationRules MeetingGamificationRules MissionGamificationRules NoteGamificationRules OpportunityGamificationRules ProductGamificationRules ProductTemplateGamificationRules ProjectGamificationRules ReportGamificationRules SocialItemGamificationRules TaskGamificationRules WorkflowGamificationRules

Public Member Functions

 attachScoringEventsByModelClassName ($modelClassName)
 scoreOnSaveModel (CEvent $event)

Static Public Member Functions

static getPointTypeAndValueDataByCategory ($category)
static getPointTypesAndValuesForCreateModel ()
static getPointTypesAndValuesForUpdateModel ()
static getPointTypesAndValuesForLoginUser ()
static getPointTypesAndValuesForSearch ()
static getPointTypesAndValuesForMassEdit ()
static getPointTypesAndValuesForImport ()
static getPointTypesAndValuesForTimeSensitiveAction ()
static scoreOnSearchModels ($modelClassName)
static scoreOnMassEditModels ($modelClassName)
static scoreOnMassDeleteModels ($modelClassName)
static scoreOnImportModels ($modelClassName)

Data Fields

const SCORE_CATEGORY_CREATE_MODEL = 'CreateModel'
const SCORE_CATEGORY_UPDATE_MODEL = 'UpdateModel'
const SCORE_CATEGORY_LOGIN_USER = 'LoginUser'
const SCORE_CATEGORY_MASS_EDIT = 'MassEdit'
const SCORE_CATEGORY_MASS_DELETE = 'MassDelete'
const SCORE_CATEGORY_SEARCH = 'Search'
const SCORE_CATEGORY_IMPORT = 'Import'
const SCORE_CATEGORY_TIME_SENSITIVE_ACTION = 'TimeSensitiveAction'

Static Protected Member Functions

static resolveCreateScoreTypeByModel ($model)
static resolveUpdateScoreTypeByModel ($model)

Protected Attributes

 $scoreOnUpdate = true

Detailed Description

Base class defining rules for gamification behavior.

Definition at line 40 of file GamificationRules.php.


Member Function Documentation

attachScoringEventsByModelClassName ( modelClassName  ) 

Given a model class name attach scoring events to that class. Every model will then invoke the scoring event.

Parameters:
string $modelClassName

Reimplemented in TaskGamificationRules.

Definition at line 101 of file GamificationRules.php.

scoreOnSaveModel ( CEvent $  event  ) 

Given a event, perform the onSave score logic for a model ($event->sender)

Parameters:
CEvent $event

Reimplemented in ContactGamificationRules, EmailTemplateGamificationRules, MissionGamificationRules, and OpportunityGamificationRules.

Definition at line 111 of file GamificationRules.php.

static getPointTypeAndValueDataByCategory ( category  )  [static]

Given a score type and score category

Returns:
the corresponding point type and value as an array indexed by the point type.
Parameters:
string $type
string $category

Definition at line 161 of file GamificationRules.php.

static getPointTypesAndValuesForLoginUser (  )  [static]
Returns:
Point type/value data for a user logging in.

Definition at line 194 of file GamificationRules.php.

static getPointTypesAndValuesForSearch (  )  [static]
Returns:
Point type/value data for a user searching in a module.

Definition at line 202 of file GamificationRules.php.

static getPointTypesAndValuesForMassEdit (  )  [static]
Returns:
Point type/value data for a user performing a mass update in a module.

Definition at line 210 of file GamificationRules.php.

static getPointTypesAndValuesForImport (  )  [static]
Returns:
Point type/value data for a user importing into a module

Definition at line 218 of file GamificationRules.php.

static getPointTypesAndValuesForTimeSensitiveAction (  )  [static]
Returns:
Point type/value data for a user performing a time-sensitive action

Reimplemented in TaskGamificationRules.

Definition at line 226 of file GamificationRules.php.

static scoreOnSearchModels ( modelClassName  )  [static]
Parameters:
string $modelClassName

Definition at line 234 of file GamificationRules.php.

static scoreOnMassEditModels ( modelClassName  )  [static]
Parameters:
string $modelClassName

Definition at line 253 of file GamificationRules.php.

static scoreOnMassDeleteModels ( modelClassName  )  [static]
Parameters:
string $modelClassName(mass delete)

Definition at line 272 of file GamificationRules.php.

static scoreOnImportModels ( modelClassName  )  [static]
Parameters:
string $modelClassName

Definition at line 291 of file GamificationRules.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sun Dec 17 07:10:24 2017