PromptRepository
extends BaseRepository
Table of Contents
Constants
-
IS_ACTIVE
= 1
-
IS_DELETED
= 1
-
IS_NOT_SYSTEM
= 'N'
-
IS_SYSTEM
= 'Y'
-
IS_WORK_WITH_RESULT
= 'Y'
-
SYSTEM_USER_ID
= 0
Methods
-
__construct()
: mixed
-
changeActivatePrompt()
: UpdateResult
-
changeActivatePrompts()
: Result
-
getAccessiblePromptList()
: array<string|int, mixed>
-
getByCode()
: array<string|int, mixed>|bool
-
getByCodes()
: bool|array<string|int, mixed>
-
getByIdForUpdate()
: array<string|int, mixed>|bool
-
getByIds()
: array<string|int, mixed>
-
getByPromptCodes()
: array<int, array{ID: string, IS_SYSTEM: string}>
-
getChildrenPromptListByIds()
: array<string|int, mixed>
-
getMainDataWithAuthorByCode()
: array<string|int, mixed>|bool
-
getMainDataWithPromptTextByCode()
: array<string|int, mixed>|bool
-
getPromptDataInAccessibleList()
: array<string|int, mixed>|bool
-
getPromptIdInAccessibleList()
: array<string|int, mixed>|bool
-
getSystemPromptsByCategory()
: array<string|int, mixed>
IS_ACTIVE
public
mixed
IS_ACTIVE
= 1
IS_DELETED
public
mixed
IS_DELETED
= 1
IS_NOT_SYSTEM
public
mixed
IS_NOT_SYSTEM
= 'N'
IS_SYSTEM
public
mixed
IS_SYSTEM
= 'Y'
IS_WORK_WITH_RESULT
public
mixed
IS_WORK_WITH_RESULT
= 'Y'
SYSTEM_USER_ID
public
mixed
SYSTEM_USER_ID
= 0
__construct()
public
__construct(UserAccessRepository $userAccessRepository) : mixed
Parameters
-
$userAccessRepository
: UserAccessRepository
-
changeActivatePrompt()
public
changeActivatePrompt(int $promptId, bool $needActivate, mixed $userId) : UpdateResult
Parameters
-
$promptId
: int
-
-
$needActivate
: bool
-
-
$userId
: mixed
-
-
throws
-
Exception
changeActivatePrompts()
public
changeActivatePrompts(array<string|int, mixed> $promptId, bool $needActivate, mixed $userId) : Result
Parameters
-
$promptId
: array<string|int, mixed>
-
-
$needActivate
: bool
-
-
$userId
: mixed
-
getAccessiblePromptList()
public
getAccessiblePromptList(int $userId, string $lang[, string $category = '' ][, string $promptCode = '' ]) : array<string|int, mixed>
Parameters
-
$userId
: int
-
-
$lang
: string
-
-
$category
: string
= ''
-
-
$promptCode
: string
= ''
-
Return values
array<string|int, mixed>
getByCode()
public
getByCode(string $code) : array<string|int, mixed>|bool
Parameters
-
$code
: string
-
Return values
array<string|int, mixed>|bool
getByCodes()
public
getByCodes(string $codeApp, string $code) : bool|array<string|int, mixed>
Parameters
-
$codeApp
: string
-
-
$code
: string
-
Return values
bool|array<string|int, mixed>
getByIdForUpdate()
public
getByIdForUpdate(int $promptId) : array<string|int, mixed>|bool
Parameters
-
$promptId
: int
-
Return values
array<string|int, mixed>|bool
getByIds()
public
getByIds(array<string|int, int> $codes) : array<string|int, mixed>
Parameters
-
$codes
: array<string|int, int>
-
-
throws
-
ArgumentException
-
throws
-
ObjectPropertyException
-
throws
-
SystemException
Return values
array<string|int, mixed>
getByPromptCodes()
public
getByPromptCodes(array<string|int, string> $codes) : array<int, array{ID: string, IS_SYSTEM: string}>
Parameters
-
$codes
: array<string|int, string>
-
-
throws
-
ArgumentException
-
throws
-
ObjectPropertyException
-
throws
-
SystemException
Return values
array<int, array{ID: string, IS_SYSTEM: string}>
getChildrenPromptListByIds()
public
getChildrenPromptListByIds(array<string|int, mixed> $promptIds, array<string|int, mixed> $forbiddenPromptIds, string $lang) : array<string|int, mixed>
Parameters
-
$promptIds
: array<string|int, mixed>
-
-
$forbiddenPromptIds
: array<string|int, mixed>
-
-
$lang
: string
-
Return values
array<string|int, mixed>
getMainDataWithAuthorByCode()
public
getMainDataWithAuthorByCode(string $code) : array<string|int, mixed>|bool
Parameters
-
$code
: string
-
-
throws
-
ArgumentException
-
throws
-
ObjectPropertyException
-
throws
-
SystemException
Return values
array<string|int, mixed>|bool
getMainDataWithPromptTextByCode()
public
getMainDataWithPromptTextByCode(string $code) : array<string|int, mixed>|bool
Parameters
-
$code
: string
-
Return values
array<string|int, mixed>|bool
getPromptDataInAccessibleList()
public
getPromptDataInAccessibleList(int $userId, int $promptId) : array<string|int, mixed>|bool
Parameters
-
$userId
: int
-
-
$promptId
: int
-
Return values
array<string|int, mixed>|bool
getPromptIdInAccessibleList()
public
getPromptIdInAccessibleList(int $userId, int $promptId[, bool|null $checkInFavorite = null ][, bool|null $checkInDelete = null ]) : array<string|int, mixed>|bool
Parameters
-
$userId
: int
-
-
$promptId
: int
-
-
$checkInFavorite
: bool|null
= null
-
-
$checkInDelete
: bool|null
= null
-
Return values
array<string|int, mixed>|bool
getSystemPromptsByCategory()
public
getSystemPromptsByCategory(string $categoryCode, string $lang, string|null $roleCode) : array<string|int, mixed>
Parameters
-
$categoryCode
: string
-
-
$lang
: string
-
-
$roleCode
: string|null
-
Return values
array<string|int, mixed>