Bitrix API

PromptValidator

Table of Contents

Constants

MAX_LEN_PROMPT  = '2500'
MIN_LEN_PROMPT  = '5'

Methods

__construct()  : mixed
accessOnPrompt()  : bool
accessOnPrompts()  : array<string|int, mixed>
getAvailableCategoriesForSave()  : array<string|int, Category>
getCategoryData()  : Category
getPromptByCode()  : int
Returns promptId by promptCode. If not found promptId throws ValidateException
getPromptByCodesNotSystems()  : array<string|int, int>
getPromptIdAndAuthorNotSystemByCode()  : array<string|int, int>
getPromptIdNotSystemByCode()  : int
Returns prompt not system by code
getPromptMainDataByCode()  : array{: int, : bool, : string}
Return main prompt data by code
hasInFavoriteList()  : void
hasNotInFavoriteList()  : void
hasPromptIdInShare()  : array<string|int, mixed>
Check has promptId in share
hasPromptType()  : void
inAccessibleIgnoreDelete()  : void
inAccessibleList()  : void
isNotMaxPromptLength()  : void
isNotMinPromptLength()  : void

Constants

Methods

accessOnPrompt()

public accessOnPrompt(int $promptId, string $fieldName, int $userId) : bool
Parameters
$promptId : int
$fieldName : string
$userId : int
Tags
throws
ValidateException
Return values
bool

accessOnPrompts()

public accessOnPrompts(array<string|int, mixed> $promptIds, string $fieldName, int $userId) : array<string|int, mixed>
Parameters
$promptIds : array<string|int, mixed>
$fieldName : string
$userId : int
Return values
array<string|int, mixed>

getAvailableCategoriesForSave()

public getAvailableCategoriesForSave(array<string|int, mixed> $values, string $fieldName) : array<string|int, Category>
Parameters
$values : array<string|int, mixed>
$fieldName : string
Tags
throws
ValidateException
Return values
array<string|int, Category>

getCategoryData()

public getCategoryData(string $value, string $fieldName) : Category
Parameters
$value : string
$fieldName : string
Return values
Category

getPromptByCode()

Returns promptId by promptCode. If not found promptId throws ValidateException

public getPromptByCode(string $promptCode, string $fieldName) : int
Parameters
$promptCode : string
$fieldName : string
Tags
throws
ValidateException
Return values
int

getPromptByCodesNotSystems()

public getPromptByCodesNotSystems(array<string|int, mixed> $promptCodes, string $fieldName) : array<string|int, int>
Parameters
$promptCodes : array<string|int, mixed>
$fieldName : string
Tags
throws
ValidateException
Return values
array<string|int, int>

getPromptIdAndAuthorNotSystemByCode()

public getPromptIdAndAuthorNotSystemByCode(string $promptCode, string $fieldName) : array<string|int, int>
Parameters
$promptCode : string
$fieldName : string
Tags
throws
ValidateException
Return values
array<string|int, int>

getPromptIdNotSystemByCode()

Returns prompt not system by code

public getPromptIdNotSystemByCode(string $promptCode, string $fieldName) : int
Parameters
$promptCode : string
$fieldName : string
Tags
throws
ValidateException
Return values
int

getPromptMainDataByCode()

Return main prompt data by code

public getPromptMainDataByCode(string $promptCode, string $fieldName) : array{: int, : bool, : string}
Parameters
$promptCode : string
$fieldName : string
Tags
throws
ValidateException
Return values
array{: int, : bool, : string}

hasInFavoriteList()

public hasInFavoriteList(int $promptId, string $fieldName, int $userId) : void
Parameters
$promptId : int
$fieldName : string
$userId : int
Tags
throws
ValidateException

hasNotInFavoriteList()

public hasNotInFavoriteList(int $promptId, string $fieldName, int $userId) : void
Parameters
$promptId : int
$fieldName : string
$userId : int
Tags
throws
ValidateException

hasPromptIdInShare()

Check has promptId in share

public hasPromptIdInShare(int $promptId, string $fieldName) : array<string|int, mixed>
Parameters
$promptId : int
$fieldName : string
Tags
throws
ValidateException
throws
ArgumentException
throws
ObjectPropertyException
throws
SystemException
Return values
array<string|int, mixed>

hasPromptType()

public hasPromptType(string $type, string $fieldName) : void
Parameters
$type : string
$fieldName : string
Tags
throws
ValidateException

inAccessibleIgnoreDelete()

public inAccessibleIgnoreDelete(int $promptId, string $fieldName, int $userId) : void
Parameters
$promptId : int
$fieldName : string
$userId : int
Tags
throws
ValidateException

inAccessibleList()

public inAccessibleList(int $promptId, string $fieldName, int $userId) : void
Parameters
$promptId : int
$fieldName : string
$userId : int
Tags
throws
ValidateException

isNotMaxPromptLength()

public isNotMaxPromptLength(string $text, string $fieldName) : void
Parameters
$text : string
$fieldName : string
Tags
throws
ValidateException

isNotMinPromptLength()

public isNotMinPromptLength(string $text, string $fieldName) : void
Parameters
$text : string
$fieldName : string
Tags
throws
ValidateException

        
On this page

Search results