ActivityPoint
                
    
        
        
    Table of Contents
    
    Methods
    
            - 
    addPoints()
    
                                 : int    
 
            - 
    adjustPoints()
    
                                 : int|null    
 
            - 
    convertPointFromPrice()
    
                                 : int    
 
            - 
    createTransaction()
    
                                 : PointTransaction    
 
            - 
    decreaseUserPointsWithAction()
    
                                 : bool    
 
            - 
    getConversionRate()
    
                                 : float    
 
            - 
    getMinPointByIds()
    
                                 : int    
 
            - 
    getTotalActivityPoints()
    
                                 : int    
 
            - 
    getUserPointBalance()
    
                                 : int    
 
            - 
    giftPoints()
    
                                 : bool    
 
            - 
    installCustomPointSettings()
    
                                 : void    
 
            - 
    isAdded()
    
                                 : bool    
 
            - 
    isCustomInstalled()
    
                                 : bool    
 
            - 
    isPackageAvailableForPurchase()
    
                                 : bool    
 
            - 
    isSubtracted()
    
                                 : bool    
 
            - 
    proceedPayment()
    
                                 : bool    
 
            - 
    updateActivityPoints()
    
                                 : bool    
 
            - 
    updateStatistic()
    
                                 : PointStatistic    
 
            - 
    updateUserPoints()
    
                                 : int    
 
    
        
            
        
                    
    
        addPoints()
        
    
    
    
    
    public
                    addPoints(User $context, User $owner, int $amount, int|null $type[, array<string, mixed> $extra = [] ]) : int
    
        
    
        Parameters
    
                    - 
                $context
                : User
                            
 
            - 
                
            
 
                    - 
                $owner
                : User
                            
 
            - 
                
            
 
                    - 
                $amount
                : int
                            
 
            - 
                
            
 
                    - 
                $type
                : int|null
                            
 
            - 
                
            
 
                    - 
                $extra
                : array<string, mixed>
                 = []            
 
            - 
                
            
 
            
    
            
                    
    
        adjustPoints()
        
    
    
    
    
    public
                    adjustPoints(User $context, User $user, int $type, int $amount) : int|null
    
        
    
        Parameters
    
                    - 
                $context
                : User
                            
 
            - 
                
            
 
                    - 
                $user
                : User
                            
 
            - 
                
            
 
                    - 
                $type
                : int
                            
 
            - 
                
            
 
                    - 
                $amount
                : int
                            
 
            - 
                
            
 
            
    
            
                    
    
        convertPointFromPrice()
        
    
    
    
    
    public
                    convertPointFromPrice(string $currency, float $amount) : int
    
        
    
        Parameters
    
                    - 
                $currency
                : string
                            
 
            - 
                
            
 
                    - 
                $amount
                : float
                            
 
            - 
                
            
 
            
    
            
                    
    
        createTransaction()
        
    
    
    
    
    public
                    createTransaction(User $user, User $owner, array<string, mixed> $data) : PointTransaction
    
        
    
        Parameters
    
                    - 
                $user
                : User
                            
 
            - 
                
            
 
                    - 
                $owner
                : User
                            
 
            - 
                
            
 
                    - 
                $data
                : array<string, mixed>
                            
 
            - 
                
            
 
            
    
            
                    
    
        decreaseUserPointsWithAction()
        
    
    
    
    
    public
                    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>
                 = []            
 
            - 
                
            
 
            
    
            
                    
    
        getConversionRate()
        
    
    
    
    
    public
                    getConversionRate(string $currency) : float
    
        
    
        Parameters
    
                    - 
                $currency
                : string
                            
 
            - 
                
            
 
            
    
            
                    
    
        getMinPointByIds()
        
    
    
    
    
    public
                    getMinPointByIds(array<string|int, mixed> $userIds) : int
    
        
    
        Parameters
    
                    - 
                $userIds
                : array<string|int, mixed>
                            
 
            - 
                
            
 
            
    
            
                    
    
        getTotalActivityPoints()
        
    
    
    
    
    public
                    getTotalActivityPoints(User $context) : int
    
        
    
        Parameters
    
                    - 
                $context
                : User
                            
 
            - 
                
            
 
            
    
            
                    
    
        getUserPointBalance()
        
    
    
    
    
    public
                    getUserPointBalance(User $context) : int
    
        
    
        Parameters
    
                    - 
                $context
                : User
                            
 
            - 
                
            
 
            
    
            
                    
    
        giftPoints()
        
    
    
    
    
    public
                    giftPoints(User $context, User $owner, int $points) : bool
    
        
    
        Parameters
    
                    - 
                $context
                : User
                            
 
            - 
                
            
 
                    - 
                $owner
                : User
                            
 
            - 
                
            
 
                    - 
                $points
                : int
                            
 
            - 
                
            
 
            
    
            
                    
    
        installCustomPointSettings()
        
    
    
    
    
    public
                    installCustomPointSettings([array<string, mixed> $default = [] ]) : void
    
        
    
        Parameters
    
                    - 
                $default
                : array<string, mixed>
                 = []            
 
            - 
                
            
 
            
    
    
                    
    
        isAdded()
        
    
    
    
    
    public
                    isAdded(int $type) : bool
    
        
    
        Parameters
    
                    - 
                $type
                : int
                            
 
            - 
                
            
 
            
    
            
                    
    
        isCustomInstalled()
        
    
    
    
    
    public
                    isCustomInstalled(string $packageId) : bool
    
        
    
        Parameters
    
                    - 
                $packageId
                : string
                            
 
            - 
                
            
 
            
    
            
                    
    
        isPackageAvailableForPurchase()
        
    
    
    
    
    public
                    isPackageAvailableForPurchase(User $user, PointPackage $package) : bool
    
        
    
        Parameters
    
                    - 
                $user
                : User
                            
 
            - 
                
            
 
                    - 
                $package
                : PointPackage
                            
 
            - 
                
            
 
            
    
            
                    
    
        isSubtracted()
        
    
    
    
    
    public
                    isSubtracted(int $type) : bool
    
        
    
        Parameters
    
                    - 
                $type
                : int
                            
 
            - 
                
            
 
            
    
            
                    
    
        proceedPayment()
        
    
    
    
    
    public
                    proceedPayment(Order $order) : bool
    
        
    
        Parameters
    
                    - 
                $order
                : Order
                            
 
            - 
                
            
 
            
    
            
                    
    
        updateActivityPoints()
        
    
    
    
    
    public
                    updateActivityPoints(User $context, int $amount) : bool
    
        
    
        Parameters
    
                    - 
                $context
                : User
                            
 
            - 
                
            
 
                    - 
                $amount
                : int
                            
 
            - 
                
            
 
            
    
            
                    
    
        updateStatistic()
        
    
    
    
    
    public
                    updateStatistic(User $context, int $type, int $amount) : PointStatistic
    
        
    
        Parameters
    
                    - 
                $context
                : User
                            
 
            - 
                
            
 
                    - 
                $type
                : int
                            
 
            - 
                
            
 
                    - 
                $amount
                : int
                            
 
            - 
                
            
 
            
    
            
                    
    
        updateUserPoints()
        
    
    
    
    
    public
                    updateUserPoints(User $user, Entity $content, string $action, int $type[, bool $allowMultiTransactionsPerItem = false ]) : int
    
        
    
        Parameters
    
                    - 
                $user
                : User
                            
 
            - 
                
            
 
                    - 
                $content
                : Entity
                            
 
            - 
                
            
 
                    - 
                $action
                : string
                            
 
            - 
                
            
 
                    - 
                $type
                : int
                            
 
            - 
                
            
 
                    - 
                $allowMultiTransactionsPerItem
                : bool
                 = false            
 
            -