MetaFox

ActivityPoint extends Facade
in package

Tags
see
ActivityPoint

Table of Contents

Methods

addPoints()  : int
adjustPoints()  : int
convertPointFromPrice()  : int
createTransaction()  : PointTransaction
decreaseUserPointsWithAction()  : bool
getFacadeAccessor()  : string
getMinPointByIds()  : int
getStatisticItems()  : array<string|int, mixed>
getTotalActivityPoints()  : int
getUserPointBalance()  : int
giftPoints()  : bool
installCustomPointSettings()  : array<string|int, mixed>
isAdded()  : bool
isCustomInstalled()  : bool
isPackageAvailableForPurchase()  : bool
isSubtracted()  : bool
proceedPayment()  : bool
updateActivityPoints()  : bool
updateStatistic()  : PointStatistic
updateUserPoints()  : int

Methods

addPoints()

public static addPoints(User $context, User $owner, int $amount, int|null $type = null, array<string|int, mixed> $extra = []) : int
Parameters
$context : User
$owner : User
$amount : int
$type = null : int|null
$extra = [] : array<string|int, mixed>
Return values
int

adjustPoints()

public static adjustPoints(User $context, User $user, int $type, int $amount) : int

;

Parameters
$context : User
$user : User
$type : int
$amount : int
Return values
int

convertPointFromPrice()

public static convertPointFromPrice(string $currency, float $amount) : int
Parameters
$currency : string
$amount : float
Return values
int

decreaseUserPointsWithAction()

public static decreaseUserPointsWithAction(User $user, int $points, string $action, string $actionTypeName, array<string|int, mixed> $actionParams = []) : bool
Parameters
$user : User
$points : int
$action : string
$actionTypeName : string
$actionParams = [] : array<string|int, mixed>
Return values
bool

getFacadeAccessor()

public static getFacadeAccessor() : string
Return values
string

getMinPointByIds()

public static getMinPointByIds(array<string|int, mixed> $userIds) : int
Parameters
$userIds : array<string|int, mixed>
Return values
int

getTotalActivityPoints()

public static getTotalActivityPoints(User $context) : int
Parameters
$context : User
Return values
int

getUserPointBalance()

public static getUserPointBalance(User $context) : int
Parameters
$context : User
Return values
int

giftPoints()

public static giftPoints(User $context, User $owner, int $points) : bool
Parameters
$context : User
$owner : User
$points : int
Return values
bool

installCustomPointSettings()

public static installCustomPointSettings(array<string|int, mixed> $default = []) : array<string|int, mixed>

;

Parameters
$default = [] : array<string|int, mixed>
Return values
array<string|int, mixed>

isAdded()

public static isAdded(int $type) : bool
Parameters
$type : int
Return values
bool

isCustomInstalled()

public static isCustomInstalled(string $packageId) : bool
Parameters
$packageId : string
Return values
bool

isSubtracted()

public static isSubtracted(int $type) : bool
Parameters
$type : int
Return values
bool

proceedPayment()

public static proceedPayment(Order $order) : bool

;

Parameters
$order : Order
Return values
bool

updateActivityPoints()

public static updateActivityPoints(User $context, int $amount, int|null $type = null) : bool
Parameters
$context : User
$amount : int
$type = null : int|null
Return values
bool

updateUserPoints()

public static updateUserPoints(User $user, Entity $content, string $action, int|null $type = null, bool $allowMultiTransactionsPerItem = false) : int
Parameters
$user : User
$content : Entity
$action : string
$type = null : int|null
$allowMultiTransactionsPerItem = false : bool
Return values
int

        
On this page

Search results