MetaFox

PointTransaction extends Model
in package
implements Entity Uses HasEntity, HasFactory, HasUserMorph, HasOwnerMorph, HasItemMorph

Class PointTransaction.

Tags
mixin

Builder

Table of Contents

Interfaces

Entity
Interface Entity.

Constants

ENTITY_TYPE  = 'activitypoint_transaction'

Properties

$action  : string
$action_id  : int
$action_params  : array<string|int, mixed>
$created_at  : string
$id  : int
$is_hidden  : bool
$module_id  : int
$package_id  : string
$points  : int
$pointSetting  : PointSetting|null
$type  : int
$updated_at  : string
$casts  : array<string|int, string>
$fillable  : array<string|int, string>
$table  : mixed

Methods

entityId()  : int
entityType()  : string
factory()  : PointTransactionFactory
getAction()  : string
getActionType()  : string
getItemAttribute()  : mixed
getOwnerAttribute()  : mixed
getOwnerEntityAttribute()  : mixed
getUserAttribute()  : mixed
getUserEntityAttribute()  : mixed
isOwner()  : bool
check if $user is the owner of entity.
isUser()  : bool
check if $user is the user (creator) of entity.
item()  : MorphTo|null
itemId()  : int
itemType()  : string
moduleName()  : string
owner()  : MorphTo
ownerEntity()  : BelongsTo
ownerId()  : int
ownerType()  : string
setting()  : BelongsTo
user()  : MorphTo
userEntity()  : BelongsTo
userId()  : int
userType()  : string
isAdded()  : Attribute
isSubtracted()  : Attribute
newFactory()  : PointTransactionFactory

Constants

Properties

$casts

protected array<string|int, string> $casts = ['is_hidden' => 'boolean', 'action_params' => 'array']

$fillable

protected array<string|int, string> $fillable = ['user_id', 'user_type', 'owner_id', 'owner_type', 'module_id', 'package_id', 'type', 'action', 'points', 'is_hidden', 'is_admincp', 'action_params', 'point_setting_id', 'created_at', 'updated_at', 'item_id', 'item_type', 'action_id']

Methods

entityId()

public entityId() : int
Return values
int

entityType()

public entityType() : string
Return values
string

factory()

public static factory(mixed $parameters) : PointTransactionFactory
Parameters
$parameters : mixed
Return values
PointTransactionFactory

getAction()

public getAction(User|null $context) : string
Parameters
$context : User|null
Return values
string

getActionType()

public getActionType(User|null $context) : string
Parameters
$context : User|null
Return values
string

getOwnerEntityAttribute()

public getOwnerEntityAttribute() : mixed

getUserEntityAttribute()

public getUserEntityAttribute() : mixed

isOwner()

check if $user is the owner of entity.

public isOwner(User $user) : bool
Parameters
$user : User
Return values
bool

isUser()

check if $user is the user (creator) of entity.

public isUser(User $user) : bool
Parameters
$user : User
Return values
bool

item()

public item() : MorphTo|null
Return values
MorphTo|null

itemType()

public itemType() : string
Return values
string

moduleName()

public moduleName() : string
Return values
string

ownerEntity()

public ownerEntity() : BelongsTo
Return values
BelongsTo

ownerType()

public ownerType() : string
Return values
string

userEntity()

public userEntity() : BelongsTo
Return values
BelongsTo

userType()

public userType() : string
Return values
string

isSubtracted()

protected isSubtracted() : Attribute
Return values
Attribute

newFactory()

protected static newFactory() : PointTransactionFactory
Return values
PointTransactionFactory

        
On this page

Search results