MetaFox

TagFriend extends Model
in package
implements Entity, TagFriendModel, IsNotifyInterface, HasUrl Uses HasEntity, HasFactory, HasUserMorph, HasOwnerMorph, HasItemMorph

Class TagFriend.

Table of Contents

Interfaces

Entity
Interface Entity.
TagFriendModel
Interface TempFileModel.
IsNotifyInterface
Interface Entity.
HasUrl

Constants

ENTITY_TYPE  = 'tag_friend'

Properties

$content  : string|null
$id  : int
$is_mention  : int
$px  : float
$py  : float
$timestamps  : mixed
$casts  : array<string, string>
$fillable  : array<string|int, string>
$table  : mixed

Methods

entityId()  : int
entityType()  : string
factory()  : TagFriendFactory
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
toLink()  : string|null
toNotification()  : array<int, mixed>|null
creator result must contain User owner.
toRouter()  : string|null
toUrl()  : string|null
user()  : MorphTo
userEntity()  : BelongsTo
userId()  : int
userType()  : string
newFactory()  : TagFriendFactory

Constants

ENTITY_TYPE

public mixed ENTITY_TYPE = 'tag_friend'

Properties

$timestamps

public mixed $timestamps = false

$casts

protected array<string, string> $casts = ['px' => 'float', 'py' => 'float', 'is_mention' => 'boolean']

$fillable

protected array<string|int, string> $fillable = ['user_id', 'user_type', 'owner_id', 'owner_type', 'item_id', 'item_type', 'px', 'py', 'is_mention', 'content', 'send_notification']

$table

protected mixed $table = 'friend_tag_friends'

Methods

entityId()

public entityId() : int
Return values
int

entityType()

public entityType() : string
Return values
string

factory()

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

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
public toLink() : string|null
Return values
string|null

toNotification()

creator result must contain User owner.

public toNotification() : array<int, mixed>|null
Tags
throws
AuthenticationException
Return values
array<int, mixed>|null

toRouter()

public toRouter() : string|null
Return values
string|null

toUrl()

public toUrl() : string|null
Return values
string|null

userEntity()

public userEntity() : BelongsTo
Return values
BelongsTo

userType()

public userType() : string
Return values
string

newFactory()

protected static newFactory() : TagFriendFactory
Return values
TagFriendFactory

        
On this page

Search results