Commission Type Abstract Base Class

Class Methods

The following methods can be invoked on instances of this class.

getAllForAffiliate(mixed iAffiliateId, array arrProperties)

Retrieves all affiliations for class type, and potentially for a specific affiliate

getCountForAffiliate(mixed iAffiliateId, array arrFilter)

Retrieves the count of affiliations for class type, and potentially for a specific affiliate

getTotalForAffiliate(mixed iAffiliateId, array arrProperties)

Retrieves the total amount of affiliations for class type, and potentially for a specific affiliate

getForEntity(int iEntityId, mixed iParentCommissionId)

Retrieve the commission for a specific entity

deleteAllForEntity(int iEntityId)

Deletes all commissions for a specific entity

getTypeFilter()

Returns a filter on the entity type for class type

mergeTypeFilter(array arrFilter)

Helper for merging a filter with the class type filter

record(mixed iAffiliateId, mixed iEntityId, mixed iParentCommissionId)

Records an affiliation for the class type

updateCommissionValue(int iCommissionId)

Recalculates the commission value and saves it
/!\ Obsviously do not call is from \Components\Commerce\Affiliates\Commissions::save()

getRenderEntityCode()

Retrieves the template contents for rendering the entity associated to a commission

createCommission(mixed iAffiliateId, int iEntityId)

Creates the commission entity (does not save it)
To be implemented by child classes

getType()

Returns the type of the class
To be implemented by child classes

renderType()

Renders the type of the entity
To be implemented by child classes

getEntityClass()

Retrieves the component for a specific entity type
To be implemented by child classes

calculateCommissionValue(mixed iCommissionId)

Recalculates a specific commission
To be implemented by child classes

__call(mixed strName, array arrArguments)

Magic function to trap calls to undefined functions and throw an exception rather than
a fatal error.

__callStatic(mixed strName, array arrArguments)

Magic function to trap static calls to undefined functions and throw an exception rather
than a fatal error.

classGetFolder()

Returns the folder where the class exists

__set_state(mixed arrValues)

classGetFolderResources()

Returns the folder where the class's resources exist

classGetSrcFile()

Returns the folder where the class exists

classGetSrcHash()

Returns the folder where the class exists

classGetReflection()

Returns the reflection data for the current class

classGetReflectionAnnotation(string strField)

Returns a specific class annotation for the current class