MetaFox

User extends Content, BigNumberId, PlatformRole, HasLocalePreference
in

Interface User.

Tags
mixin

HasRoles

mixin

\App\Models\User

Table of Contents

Methods

activity_feed()  : MorphOne|null
canBeBlocked()  : bool
Determine if resource can be blocked.
decrementAmount()  : int
disableFeedSponsor()  : void
disableSponsor()  : void
enableFeedSponsor()  : void
enableSponsor()  : void
entityId()  : int
entityType()  : string
getApprovedMessage()  : string|null
getDeclinedMessage()  : string|null
getItemPrivacy()  : int|null
Indicates its content has privacy.
getOwnerPendingMessage()  : string|null
getPendingMessage()  : string|null
getPermissionValue()  : mixed
Determine if the user may perform the given permission.
getRepresentativePrivacy()  : int|null
getRepresentativePrivacyDetail()  : array<string, mixed>|null
getSmallestRoleId()  : int
This method shall return the highest priority role base on user role level.
hasAdminRole()  : bool
hasContentPrivacy()  : bool
Indicates this has content-based privacy, so it will be treated as a regular content (like Blog, Poll) when checking for view privacy.
hasPendingMode()  : bool
hasPermissionValue()  : bool
Determine if the user may perform the given permission.
hasStaffRole()  : bool
hasSuperAdminRole()  : bool
incrementAmount()  : int
isApproved()  : bool
isDeleted()  : bool
isDraft()  : bool
isGuest()  : bool
isOwnerPending()  : bool
isPendingMode()  : bool|null
isPublished()  : bool
isSponsored()  : bool
isSponsoredInFeed()  : bool
isTaggingAllowed()  : bool
moduleName()  : string
owner()  : User|MorphTo|BelongsTo
ownerEntity()  : UserEntity|BelongsTo
ownerId()  : int
ownerType()  : string
privacyItem()  : self|null
Get indicate item handle privacy logic.
reactItem()  : self
Get indicate item handle privacy logic.
setEntityId()  : void
toDeclinedContentLink()  : string|null
toDeclinedContentUrl()  : string|null
toLink()  : string|null
toRouter()  : string|null
toSponsorData()  : array<string|int, mixed>|null
toTitle()  : string
toUrl()  : string|null
toUserResource()  : array<string, mixed>
user()  : User|MorphTo|BelongsTo
userEntity()  : UserEntity|BelongsTo
userId()  : int
userType()  : string

Methods

activity_feed()

public activity_feed() : MorphOne|null
Tags
SuppressWarnings

(PHPMD.CamelCaseMethodName)

Return values
MorphOne|null

canBeBlocked()

Determine if resource can be blocked.

public canBeBlocked() : bool
Return values
bool

decrementAmount()

public decrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
$column : string
$amount : int = 1
Return values
int

disableFeedSponsor()

public disableFeedSponsor() : void

disableSponsor()

public disableSponsor() : void

enableFeedSponsor()

public enableFeedSponsor() : void

enableSponsor()

public enableSponsor() : void

entityId()

public entityId() : int
Return values
int

entityType()

public entityType() : string
Return values
string

getApprovedMessage()

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

getDeclinedMessage()

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

getItemPrivacy()

Indicates its content has privacy.

public getItemPrivacy() : int|null
Return values
int|null

getOwnerPendingMessage()

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

getPendingMessage()

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

getPermissionValue()

Determine if the user may perform the given permission.

public getPermissionValue(string|Permission $permission) : mixed
Parameters
$permission : string|Permission
Tags
throws
GuardDoesNotMatch

getRepresentativePrivacy()

public getRepresentativePrivacy() : int|null
Return values
int|null

getRepresentativePrivacyDetail()

public getRepresentativePrivacyDetail(int $privacy) : array<string, mixed>|null
Parameters
$privacy : int
Return values
array<string, mixed>|null

getSmallestRoleId()

This method shall return the highest priority role base on user role level.

public getSmallestRoleId() : int
Return values
int

hasAdminRole()

public hasAdminRole() : bool
Return values
bool

hasContentPrivacy()

Indicates this has content-based privacy, so it will be treated as a regular content (like Blog, Poll) when checking for view privacy.

public hasContentPrivacy() : bool
Return values
bool

hasPendingMode()

public hasPendingMode() : bool
Return values
bool

hasPermissionValue()

Determine if the user may perform the given permission.

public hasPermissionValue(string|Permission $permission) : bool
Parameters
$permission : string|Permission
Tags
throws
GuardDoesNotMatch
Return values
bool

hasStaffRole()

public hasStaffRole() : bool
Return values
bool

hasSuperAdminRole()

public hasSuperAdminRole() : bool
Return values
bool

incrementAmount()

public incrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
$column : string
$amount : int = 1
Return values
int

isApproved()

public isApproved() : bool
Return values
bool

isDeleted()

public isDeleted() : bool
Return values
bool

isDraft()

public isDraft() : bool
Return values
bool

isGuest()

public isGuest() : bool
Return values
bool

isOwnerPending()

public isOwnerPending() : bool
Return values
bool

isPendingMode()

public isPendingMode() : bool|null
Return values
bool|null

isPublished()

public isPublished() : bool
Return values
bool

isSponsored()

public isSponsored() : bool
Return values
bool

isSponsoredInFeed()

public isSponsoredInFeed() : bool
Return values
bool

isTaggingAllowed()

public isTaggingAllowed() : bool
Return values
bool

moduleName()

public moduleName() : string
Return values
string

owner()

public owner() : User|MorphTo|BelongsTo
Return values
User|MorphTo|BelongsTo

ownerId()

public ownerId() : int
Return values
int

ownerType()

public ownerType() : string
Return values
string

privacyItem()

Get indicate item handle privacy logic.

public privacyItem() : self|null
Return values
self|null

reactItem()

Get indicate item handle privacy logic.

public reactItem() : self
Return values
self

setEntityId()

public setEntityId(int $id) : void
Parameters
$id : int
public toDeclinedContentLink() : string|null
Return values
string|null

toDeclinedContentUrl()

public toDeclinedContentUrl() : string|null
Return values
string|null
public toLink() : string|null
Return values
string|null

toRouter()

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

toSponsorData()

public toSponsorData() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

toTitle()

public toTitle() : string
Return values
string

toUrl()

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

toUserResource()

public toUserResource() : array<string, mixed>
Return values
array<string, mixed>

user()

public user() : User|MorphTo|BelongsTo
Return values
User|MorphTo|BelongsTo

userId()

public userId() : int
Return values
int

userType()

public userType() : string
Return values
string

        
On this page

Search results