UserExternal extends User
Table of Contents
Constants
- ONLINE_DATA_SELECTED_FIELDS = ['USER_ID' => 'ID', 'IDLE' => 'STATUS.IDLE', 'DESKTOP_LAST_DATE' => 'STATUS.DESKTOP_LAST_DATE', 'MOBILE_LAST_DATE' => 'STATUS.MOBILE_LAST_DATE', 'LAST_ACTIVITY_DATE']
- ONLINE_DATA_SELECTED_FIELDS_WITHOUT_STATUS = ['USER_ID' => 'ID', 'LAST_ACTIVITY_DATE']
- PERSONAL_PHONE = 'PERSONAL_PHONE'
- PHONE_INNER = 'INNER_PHONE'
- PHONE_MOBILE = 'PERSONAL_MOBILE'
- PHONE_WORK = 'WORK_PHONE'
Methods
- checkAccess() : Result
- clearStaticCache() : void
- getAbsent() : DateTime|null
- getArray() : array<string|int, mixed>
- getAvatar() : string
- getAvatarHr() : string
- getAvatarId() : int
- getBirthday() : string
- getChatWith() : PrivateChat|null
- Return chat with user AND create chat if it does not exist
- getColor() : string
- getContext() : Context
- Returns the local or global context for the action.
- getCurrent() : self
- getDepartmentIds() : array<string|int, mixed>
- getDepartments() : Departments
- getDesktopLastDate() : DateTime|null
- getEmail() : string
- getExternalAuthId() : string
- getFirstAdmin() : int
- getFirstName() : string|null
- getGender() : string
- getId() : int|null
- Returns the id of the entity
- getIdle() : DateTime|null
- getInstance() : self
- getLanguageId() : string|null
- getLastActivityDate() : DateTime|null
- getLastName() : string|null
- getMobileLastDate() : DateTime|null
- getName() : string|null
- getPhoneDevice() : bool
- getPhones() : array<string|int, mixed>
- getRestEntityName() : string
- Returns the name of the entity that will be used in the rest response
- getServices() : array<string|int, mixed>
- getStatus() : string|null
- getType() : UserType
- getTzOffset() : string
- getWebsite() : string
- getWorkPosition() : string|null
- initByArray() : self
- isActive() : bool
- isAdmin() : bool
- isBot() : bool
- isConnector() : bool
- isExist() : bool
- isExtranet() : bool
- isNetwork() : bool
- isOnlineDataFilled() : bool
- isSuperAdmin() : bool
- setContext() : self
- Sets new context for operations.
- setContextUser() : self
- setOnlineData() : void
- toRestFormat() : array<string|int, mixed>|null
- Returns an array in JSON like format to return the entity as a rest response.
- unsetOnlineData() : void
- withContext() : static
- Provides local context for the action.
- withContextUser() : static
- Provides local context for the action.
Constants
ONLINE_DATA_SELECTED_FIELDS
public
mixed
ONLINE_DATA_SELECTED_FIELDS
= ['USER_ID' => 'ID', 'IDLE' => 'STATUS.IDLE', 'DESKTOP_LAST_DATE' => 'STATUS.DESKTOP_LAST_DATE', 'MOBILE_LAST_DATE' => 'STATUS.MOBILE_LAST_DATE', 'LAST_ACTIVITY_DATE']
ONLINE_DATA_SELECTED_FIELDS_WITHOUT_STATUS
public
mixed
ONLINE_DATA_SELECTED_FIELDS_WITHOUT_STATUS
= ['USER_ID' => 'ID', 'LAST_ACTIVITY_DATE']
PERSONAL_PHONE
public
mixed
PERSONAL_PHONE
= 'PERSONAL_PHONE'
PHONE_INNER
public
mixed
PHONE_INNER
= 'INNER_PHONE'
PHONE_MOBILE
public
mixed
PHONE_MOBILE
= 'PERSONAL_MOBILE'
PHONE_WORK
public
mixed
PHONE_WORK
= 'WORK_PHONE'
Methods
checkAccess()
public
final checkAccess([int|null $idOtherUser = null ]) : Result
Parameters
- $idOtherUser : int|null = null
Return values
ResultclearStaticCache()
public
static clearStaticCache(int $id) : void
Parameters
- $id : int
getAbsent()
public
getAbsent() : DateTime|null
Return values
DateTime|nullgetArray()
public
getArray([array<string|int, mixed> $option = [] ]) : array<string|int, mixed>
Parameters
- $option : array<string|int, mixed> = []
Return values
array<string|int, mixed>getAvatar()
public
getAvatar([bool $forRest = true ]) : string
Parameters
- $forRest : bool = true
Return values
stringgetAvatarHr()
public
getAvatarHr([bool $forRest = true ]) : string
Parameters
- $forRest : bool = true
Return values
stringgetAvatarId()
public
getAvatarId() : int
Return values
intgetBirthday()
public
getBirthday() : string
Return values
stringgetChatWith()
Return chat with user AND create chat if it does not exist
public
getChatWith(int $userId[, bool $createIfNotExist = true ]) : PrivateChat|null
Parameters
- $userId : int
- $createIfNotExist : bool = true
Return values
PrivateChat|nullgetColor()
public
getColor() : string
Return values
stringgetContext()
Returns the local or global context for the action.
public
getContext() : Context
Return values
ContextgetCurrent()
public
static getCurrent() : self
Return values
selfgetDepartmentIds()
public
getDepartmentIds() : array<string|int, mixed>
Return values
array<string|int, mixed>getDepartments()
public
getDepartments() : Departments
Return values
DepartmentsgetDesktopLastDate()
public
getDesktopLastDate([bool $real = false ]) : DateTime|null
Parameters
- $real : bool = false
Return values
DateTime|nullgetEmail()
public
getEmail() : string
Return values
stringgetExternalAuthId()
public
getExternalAuthId() : string
Return values
stringgetFirstAdmin()
public
static getFirstAdmin() : int
Return values
intgetFirstName()
public
getFirstName() : string|null
Return values
string|nullgetGender()
public
getGender() : string
Return values
stringgetId()
Returns the id of the entity
public
getId() : int|null
Return values
int|nullgetIdle()
public
getIdle([bool $real = false ]) : DateTime|null
Parameters
- $real : bool = false
Return values
DateTime|nullgetInstance()
public
static getInstance(int|null $id) : self
Parameters
- $id : int|null
Return values
selfgetLanguageId()
public
getLanguageId() : string|null
Return values
string|nullgetLastActivityDate()
public
getLastActivityDate() : DateTime|null
Return values
DateTime|nullgetLastName()
public
getLastName() : string|null
Return values
string|nullgetMobileLastDate()
public
getMobileLastDate([bool $real = false ]) : DateTime|null
Parameters
- $real : bool = false
Return values
DateTime|nullgetName()
public
getName() : string|null
Return values
string|nullgetPhoneDevice()
public
getPhoneDevice() : bool
Return values
boolgetPhones()
public
getPhones() : array<string|int, mixed>
Return values
array<string|int, mixed>getRestEntityName()
Returns the name of the entity that will be used in the rest response
public
static getRestEntityName() : string
Return values
stringgetServices()
public
getServices() : array<string|int, mixed>
Return values
array<string|int, mixed>getStatus()
public
getStatus([bool $real = false ]) : string|null
Parameters
- $real : bool = false
Return values
string|nullgetType()
public
getType() : UserType
Return values
UserTypegetTzOffset()
public
getTzOffset() : string
Return values
stringgetWebsite()
public
getWebsite() : string
Return values
stringgetWorkPosition()
public
getWorkPosition() : string|null
Return values
string|nullinitByArray()
public
static initByArray(array<string|int, mixed> $userData) : self
Parameters
- $userData : array<string|int, mixed>
Return values
selfisActive()
public
isActive() : bool
Return values
boolisAdmin()
public
isAdmin() : bool
Return values
boolisBot()
public
isBot() : bool
Return values
boolisConnector()
public
isConnector() : bool
Return values
boolisExist()
public
isExist() : bool
Return values
boolisExtranet()
public
isExtranet() : bool
Return values
boolisNetwork()
public
isNetwork() : bool
Return values
boolisOnlineDataFilled()
public
isOnlineDataFilled(bool $withStatus) : bool
Parameters
- $withStatus : bool
Return values
boolisSuperAdmin()
public
isSuperAdmin() : bool
Return values
boolsetContext()
Sets new context for operations.
public
setContext(Context|null $context) : self
Parameters
- $context : Context|null
Return values
selfsetContextUser()
public
setContextUser(mixed $user) : self
Parameters
- $user : mixed
Return values
selfsetOnlineData()
public
setOnlineData(array<string|int, mixed> $onlineData, bool $withStatus) : void
Parameters
- $onlineData : array<string|int, mixed>
- $withStatus : bool
toRestFormat()
Returns an array in JSON like format to return the entity as a rest response.
public
toRestFormat([array<string|int, mixed> $option = [] ]) : array<string|int, mixed>|null
Parameters
- $option : array<string|int, mixed> = []
Return values
array<string|int, mixed>|nullunsetOnlineData()
public
unsetOnlineData() : void
withContext()
Provides local context for the action.
public
withContext(Context|null $context) : static
Parameters
- $context : Context|null
Return values
staticwithContextUser()
Provides local context for the action.
public
withContextUser(int|User|User $user) : static
Parameters
- $user : int|User|User