MetaFox

User
in package
implements UserContract Uses UserLocationTrait

Tags
SuppressWarnings

(PHPMD.CouplingBetweenObjects)

SuppressWarnings

(PHPMD.ExcessiveClassComplexity)

Table of Contents

Interfaces

UserContract
Interface UserContract.

Constants

AUTO_APPROVED_TAGGED_SETTING  = 'user_auto_add_tagger_post'
Profile/Account setting name.
AUTO_APPROVED_TAGGER_POST  = 0
AUTO_PLAY_VIDEO_SETTING  = 'user_auto_play_videos'
DATE_OF_BIRTH_SHOW_ALL  = 4
DATE_OF_BIRTH_SHOW_DAY_MONTH  = 2
DISPLAY_BOTH  = 'both'
DISPLAY_FULL_NAME  = 'full_name'
DISPLAY_USER_NAME  = 'user_name'
GENERATED_USER_NAME  = 'user-%s-%s'
MENTION_REGEX  = '^\\[user=(.*?)\\]^'
NOT_AUTO_APPROVED_TAGGER_POST  = 1
THEME_ID_SETTING  = 'profile_theme_id'
THEME_PREFERENCE_NAMES  = [self::THEME_TYPE_SETTING, self::THEME_ID_SETTING]
THEME_TYPE_SETTING  = 'profile_theme_type'

Properties

$relationRepository  : UserRelationRepositoryInterface
$repository  : UserRepositoryInterface

Methods

__construct()  : mixed
canViewLocation()  : bool
getAddress()  : string|null
getFirstName()  : string
getFriendship()  : int|null
getGender()  : string|null
getGuestUser()  : Authenticatable
getLastName()  : string
getLocation()  : array<string, mixed>
getLocationValue()  : string
getMentions()  : array<string|int, int>
getNotificationSettingsByChannel()  : array<int, mixed>
getPossessiveGender()  : string
getShortName()  : string
getSummary()  : string|null
getTimeZoneForForm()  : array<int, mixed>
getTimeZoneNameById()  : string|null
getUserAge()  : int|null
getUsersByRoleId()  : Collection|null
getVideoSettings()  : array<string, mixed>
hasPendingSubscription()  : array<string|int, mixed>|null
isBan()  : bool
isFollowing()  : bool
splitName()  : array<string|int, mixed>
totalFollowers()  : int
updateInvisibleMode()  : User
updateLastActivity()  : bool
updateLastLogin()  : bool
updateNotificationSettingsByChannel()  : bool

Constants

AUTO_APPROVED_TAGGED_SETTING

Profile/Account setting name.

public mixed AUTO_APPROVED_TAGGED_SETTING = 'user_auto_add_tagger_post'

AUTO_APPROVED_TAGGER_POST

public mixed AUTO_APPROVED_TAGGER_POST = 0

AUTO_PLAY_VIDEO_SETTING

public mixed AUTO_PLAY_VIDEO_SETTING = 'user_auto_play_videos'

DATE_OF_BIRTH_SHOW_ALL

public mixed DATE_OF_BIRTH_SHOW_ALL = 4
Tags
deprecated

v5.1.8

DATE_OF_BIRTH_SHOW_DAY_MONTH

public mixed DATE_OF_BIRTH_SHOW_DAY_MONTH = 2
Tags
deprecated

v5.1.8

DISPLAY_BOTH

public mixed DISPLAY_BOTH = 'both'

DISPLAY_FULL_NAME

public mixed DISPLAY_FULL_NAME = 'full_name'

DISPLAY_USER_NAME

public mixed DISPLAY_USER_NAME = 'user_name'

GENERATED_USER_NAME

public mixed GENERATED_USER_NAME = 'user-%s-%s'

MENTION_REGEX

public mixed MENTION_REGEX = '^\\[user=(.*?)\\]^'

NOT_AUTO_APPROVED_TAGGER_POST

public mixed NOT_AUTO_APPROVED_TAGGER_POST = 1

THEME_ID_SETTING

public mixed THEME_ID_SETTING = 'profile_theme_id'

THEME_PREFERENCE_NAMES

public mixed THEME_PREFERENCE_NAMES = [self::THEME_TYPE_SETTING, self::THEME_ID_SETTING]

THEME_TYPE_SETTING

public mixed THEME_TYPE_SETTING = 'profile_theme_type'

Properties

Methods

getAddress()

public getAddress(User $context, User $user) : string|null
Parameters
$context : User
$user : User
Tags
inheritDoc
Return values
string|null

getFirstName()

public getFirstName(string $name) : string
Parameters
$name : string
Return values
string

getFriendship()

public getFriendship(User $user, User $targetUser) : int|null
Parameters
$user : User
$targetUser : User
Return values
int|null

getGuestUser()

public getGuestUser() : Authenticatable
Return values
Authenticatable

getLastName()

public getLastName(string $name) : string
Parameters
$name : string
Return values
string

getLocation()

public getLocation(User $context, User $resource) : array<string, mixed>
Parameters
$context : User
$resource : User
Return values
array<string, mixed>

getLocationValue()

public getLocationValue(User $context, mixed $resource) : string
Parameters
$context : User
$resource : mixed
Return values
string

getMentions()

public getMentions(string $content) : array<string|int, int>
Parameters
$content : string
Return values
array<string|int, int>

getNotificationSettingsByChannel()

public getNotificationSettingsByChannel(User $user, string $channel) : array<int, mixed>
Parameters
$user : User
$channel : string
Return values
array<int, mixed>

getPossessiveGender()

public getPossessiveGender(UserGender|null $gender) : string
Parameters
$gender : UserGender|null
Return values
string

getShortName()

public getShortName(string $name) : string
Parameters
$name : string
Return values
string

getSummary()

public getSummary(User $context, User $user) : string|null
Parameters
$context : User
$user : User
Tags
inherhitDoc
SuppressWarnings

(PHPMD.CyclomaticComplexity)

SuppressWarnings

(PHPMD.NPathComplexity)

Return values
string|null

getTimeZoneForForm()

public getTimeZoneForForm() : array<int, mixed>
Return values
array<int, mixed>

getTimeZoneNameById()

public getTimeZoneNameById(int $id) : string|null
Parameters
$id : int
Return values
string|null

getUserAge()

public getUserAge(string|null $birthday) : int|null
Parameters
$birthday : string|null
Tags
deprecated

v5.1.8

Return values
int|null

getUsersByRoleId()

public getUsersByRoleId(int $roleId) : Collection|null
Parameters
$roleId : int
Return values
Collection|null

getVideoSettings()

public getVideoSettings(User $user) : array<string, mixed>
Parameters
$user : User
Return values
array<string, mixed>

hasPendingSubscription()

public hasPendingSubscription(Request $request, User $user[, bool $isMobile = false ]) : array<string|int, mixed>|null
Parameters
$request : Request
$user : User
$isMobile : bool = false
Return values
array<string|int, mixed>|null

isBan()

public isBan(int $userId) : bool
Parameters
$userId : int
Return values
bool

isFollowing()

public isFollowing(User $context, User $user) : bool
Parameters
$context : User
$user : User
Tags
inheritDoc
Return values
bool

splitName()

public splitName(string $name) : array<string|int, mixed>
Parameters
$name : string
Return values
array<string|int, mixed>

totalFollowers()

public totalFollowers(User $user) : int
Parameters
$user : User
Tags
inheritDoc
Return values
int

updateInvisibleMode()

public updateInvisibleMode(User $context, int $isInvisible) : User
Parameters
$context : User
$isInvisible : int
Return values
User

updateLastActivity()

public updateLastActivity(User $context) : bool
Parameters
$context : User
Return values
bool

updateLastLogin()

public updateLastLogin(User|null $context) : bool
Parameters
$context : User|null
Return values
bool

updateNotificationSettingsByChannel()

public updateNotificationSettingsByChannel(User $context, array<string, int> $attributes) : bool
Parameters
$context : User
$attributes : array<string, int>
Return values
bool

        
On this page

Search results