All Data Structures Functions Variables Pages
Public Member Functions | Static Public Member Functions | Data Fields | Static Protected Member Functions | Protected Attributes
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

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

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 getPointTypesAndValuesForCreateModel ( )
static
Returns
Point type/value data for generically creating a model.

Definition at line 178 of file GamificationRules.php.

static getPointTypesAndValuesForUpdateModel ( )
static
Returns
Point type/value data for generically updating a model.

Definition at line 186 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

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,(massdelete)

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:
Generated on Wed Jun 3 2020 07:10:48