CUserTypeManager
This class essentially serves as an interface layer between the values of user properties and the entity to which they are attached.
Tags
Table of Contents
Constants
- BASE_TYPE_DATETIME = "datetime"
- BASE_TYPE_DOUBLE = "double"
- BASE_TYPE_ENUM = "enum"
- BASE_TYPE_FILE = "file"
- BASE_TYPE_INT = "int"
- BASE_TYPE_STRING = "string"
Methods
- AddFindFields() : mixed
- AddUserField() : mixed
- AddUserFields() : mixed
- AdminListAddFilter() : mixed
- Add value for filter.
- AdminListAddFilterFields() : mixed
- Add field for filter.
- AdminListAddFilterFieldsV2() : mixed
- AdminListAddFilterV2() : mixed
- AdminListAddHeaders() : mixed
- AdminListPrepareFields() : mixed
- AdminListShowFilter() : mixed
- CallUserTypeComponent() : mixed
- CheckFields() : bool
- CheckFieldsWithOldData() : bool
- Replacement for CheckFields, if you are already have fetched old data
- CleanCache() : mixed
- copy() : mixed
- Delete() : mixed
- EditFormAddFields() : mixed
- EditFormShowTab() : mixed
- EditFormTab() : mixed
- getCustomData() : array<string|int, mixed>
- GetDBColumnType() : mixed
- GetEditFormHTML() : mixed
- getEntityField() : DatetimeField|FloatField|IntegerField|StringField|mixed
- getEntityList() : array<string|int, mixed>
- Aggregates entity map by event.
- getEntityReferences() : array<string|int, Reference>
- GetFilterHTML() : mixed
- getListView() : mixed
- GetPublicEdit() : mixed
- getPublicText() : mixed
- GetPublicView() : mixed
- GetRights() : mixed
- GetSettingsHTML() : mixed
- GetUserFields() : mixed
- Function to return metadata of fields defined for an entity.
- getUserFieldsWithReadyData() : array<string|int, mixed>
- Replacement for getUserFields, if you are already have fetched old data
- GetUserFieldValue() : mixed
- GetUserType() : array<string|int, mixed>|bool
- Function to return type metadata.
- getUtmDBColumnType() : mixed
- getUtsDBColumnType() : mixed
- IsNotEmpty() : mixed
- LoadMultipleValues() : mixed
- OnAfterFetch() : mixed
- OnEntityDelete() : mixed
- OnSearchIndex() : mixed
- PrepareSettings() : mixed
- renderField() : string|null
- ShowScript() : mixed
- Update() : mixed
Constants
BASE_TYPE_DATETIME
public
mixed
BASE_TYPE_DATETIME
= "datetime"
BASE_TYPE_DOUBLE
public
mixed
BASE_TYPE_DOUBLE
= "double"
BASE_TYPE_ENUM
public
mixed
BASE_TYPE_ENUM
= "enum"
BASE_TYPE_FILE
public
mixed
BASE_TYPE_FILE
= "file"
BASE_TYPE_INT
public
mixed
BASE_TYPE_INT
= "int"
BASE_TYPE_STRING
public
mixed
BASE_TYPE_STRING
= "string"
Methods
AddFindFields()
public
AddFindFields(mixed $entity_id, mixed &$arFindFields) : mixed
Parameters
- $entity_id : mixed
- $arFindFields : mixed
AddUserField()
public
AddUserField(mixed $arUserField, mixed $value, CAdminListRow $row) : mixed
Parameters
- $arUserField : mixed
- $value : mixed
- $row : CAdminListRow
AddUserFields()
public
AddUserFields(mixed $entity_id, mixed $arRes, mixed $row) : mixed
Parameters
- $entity_id : mixed
- $arRes : mixed
- $row : mixed
AdminListAddFilter()
Add value for filter.
public
AdminListAddFilter(string $entityId, array<string|int, mixed> &$arFilter) : mixed
Parameters
- $entityId : string
-
Entity id.
- $arFilter : array<string|int, mixed>
-
Array for fill.
AdminListAddFilterFields()
Add field for filter.
public
AdminListAddFilterFields(string $entityId, array<string|int, mixed> &$arFilterFields) : mixed
Parameters
- $entityId : string
-
Entity id.
- $arFilterFields : array<string|int, mixed>
-
Array for fill.
AdminListAddFilterFieldsV2()
public
AdminListAddFilterFieldsV2(mixed $entityId, mixed &$arFilterFields) : mixed
Parameters
- $entityId : mixed
- $arFilterFields : mixed
AdminListAddFilterV2()
public
AdminListAddFilterV2(mixed $entityId, mixed &$arFilter, mixed $filterId, mixed $filterFields) : mixed
Parameters
- $entityId : mixed
- $arFilter : mixed
- $filterId : mixed
- $filterFields : mixed
AdminListAddHeaders()
public
AdminListAddHeaders(mixed $entity_id, mixed &$arHeaders) : mixed
Parameters
- $entity_id : mixed
- $arHeaders : mixed
AdminListPrepareFields()
public
AdminListPrepareFields(mixed $entity_id, mixed &$arFields) : mixed
Parameters
- $entity_id : mixed
- $arFields : mixed
AdminListShowFilter()
public
AdminListShowFilter(mixed $entity_id) : mixed
Parameters
- $entity_id : mixed
CallUserTypeComponent()
public
CallUserTypeComponent(mixed $componentName, mixed $componentTemplate, mixed $arUserField[, mixed $arAdditionalParameters = [] ]) : mixed
Parameters
- $componentName : mixed
- $componentTemplate : mixed
- $arUserField : mixed
- $arAdditionalParameters : mixed = []
CheckFields()
public
CheckFields(string $entity_id, int|null $ID, array<string|int, mixed> $arFields[, bool|int $user_id = false ][, bool $checkRequired = true ][, array<string|int, mixed>|null $requiredFields = null ][, array<string|int, mixed>|null $filteredFields = null ]) : bool
Parameters
- $entity_id : string
- $ID : int|null
- $arFields : array<string|int, mixed>
- $user_id : bool|int = false
-
False means current user id.
- $checkRequired : bool = true
-
Whether to check required fields.
- $requiredFields : array<string|int, mixed>|null = null
-
Conditionally required fields.
- $filteredFields : array<string|int, mixed>|null = null
-
Filtered fields.
Return values
boolCheckFieldsWithOldData()
Replacement for CheckFields, if you are already have fetched old data
public
CheckFieldsWithOldData(mixed $entity_id, mixed $oldData, mixed $arFields) : bool
Parameters
- $entity_id : mixed
- $oldData : mixed
- $arFields : mixed
Return values
boolCleanCache()
public
CleanCache() : mixed
copy()
public
copy(mixed $entity_id, mixed $id, mixed $copiedId, mixed $entityObject[, mixed $userId = false ][, mixed $ignoreList = [] ]) : mixed
Parameters
- $entity_id : mixed
- $id : mixed
- $copiedId : mixed
- $entityObject : mixed
- $userId : mixed = false
- $ignoreList : mixed = []
Delete()
public
Delete(mixed $entity_id, mixed $ID) : mixed
Parameters
- $entity_id : mixed
- $ID : mixed
EditFormAddFields()
public
EditFormAddFields(mixed $entity_id, mixed &$arFields[, array<string|int, mixed> $options = null ]) : mixed
Parameters
- $entity_id : mixed
- $arFields : mixed
- $options : array<string|int, mixed> = null
EditFormShowTab()
public
EditFormShowTab(mixed $entity_id, mixed $bVarsFromForm, mixed $ID) : mixed
Parameters
- $entity_id : mixed
- $bVarsFromForm : mixed
- $ID : mixed
EditFormTab()
public
EditFormTab(mixed $entity_id) : mixed
Parameters
- $entity_id : mixed
getCustomData()
public
getCustomData(array<string|int, mixed> $userField, int $entityValueId) : array<string|int, mixed>
Parameters
- $userField : array<string|int, mixed>
- $entityValueId : int
Return values
array<string|int, mixed>GetDBColumnType()
public
GetDBColumnType(mixed $arUserField) : mixed
Parameters
- $arUserField : mixed
GetEditFormHTML()
public
GetEditFormHTML(mixed $bVarsFromForm, mixed $form_value, mixed $arUserField) : mixed
Parameters
- $bVarsFromForm : mixed
- $form_value : mixed
- $arUserField : mixed
getEntityField()
public
getEntityField(mixed $arUserField[, null|string $fieldName = null ][, array<string|int, mixed> $fieldParameters = [] ]) : DatetimeField|FloatField|IntegerField|StringField|mixed
Parameters
- $arUserField : mixed
- $fieldName : null|string = null
- $fieldParameters : array<string|int, mixed> = []
Tags
Return values
DatetimeField|FloatField|IntegerField|StringField|mixedgetEntityList()
Aggregates entity map by event.
public
getEntityList() : array<string|int, mixed>
Return values
array<string|int, mixed> —[ENTITY_ID => 'SomeTable']
getEntityReferences()
public
getEntityReferences(mixed $arUserField, ScalarField $entityField) : array<string|int, Reference>
Parameters
- $arUserField : mixed
- $entityField : ScalarField
Return values
array<string|int, Reference>GetFilterHTML()
public
GetFilterHTML(mixed $arUserField, mixed $filter_name, mixed $filter_value) : mixed
Parameters
- $arUserField : mixed
- $filter_name : mixed
- $filter_value : mixed
getListView()
public
getListView(mixed $userfield, mixed $value) : mixed
Parameters
- $userfield : mixed
- $value : mixed
GetPublicEdit()
public
GetPublicEdit(mixed $arUserField[, mixed $arAdditionalParameters = [] ]) : mixed
Parameters
- $arUserField : mixed
- $arAdditionalParameters : mixed = []
getPublicText()
public
getPublicText(mixed $userField) : mixed
Parameters
- $userField : mixed
GetPublicView()
public
GetPublicView(mixed $arUserField[, mixed $arAdditionalParameters = [] ]) : mixed
Parameters
- $arUserField : mixed
- $arAdditionalParameters : mixed = []
GetRights()
public
GetRights([mixed $ENTITY_ID = false ][, mixed $ID = false ]) : mixed
Parameters
- $ENTITY_ID : mixed = false
- $ID : mixed = false
GetSettingsHTML()
public
GetSettingsHTML(mixed $arUserField[, mixed $bVarsFromForm = false ]) : mixed
Parameters
- $arUserField : mixed
- $bVarsFromForm : mixed = false
GetUserFields()
Function to return metadata of fields defined for an entity.
public
GetUserFields(mixed $entity_id[, mixed $value_id = 0 ][, mixed $LANG = false ][, mixed $user_id = false ][, mixed $selectFields = null ]) : mixed
Important! The $arUserField includes the field ENTITY_VALUE_ID - this is the identifier of the entity instance that allows distinguishing new records from old ones and accordingly using default values.
Parameters
- $entity_id : mixed
- $value_id : mixed = 0
- $LANG : mixed = false
- $user_id : mixed = false
- $selectFields : mixed = null
getUserFieldsWithReadyData()
Replacement for getUserFields, if you are already have fetched old data
public
getUserFieldsWithReadyData(mixed $entity_id, mixed $readyData[, bool $LANG = false ][, bool $user_id = false ][, string $primaryIdName = 'VALUE_ID' ]) : array<string|int, mixed>
Parameters
- $entity_id : mixed
- $readyData : mixed
- $LANG : bool = false
- $user_id : bool = false
- $primaryIdName : string = 'VALUE_ID'
Return values
array<string|int, mixed>GetUserFieldValue()
public
GetUserFieldValue(mixed $entity_id, mixed $field_id, mixed $value_id[, mixed $LANG = false ]) : mixed
Parameters
- $entity_id : mixed
- $field_id : mixed
- $value_id : mixed
- $LANG : mixed = false
GetUserType()
Function to return type metadata.
public
GetUserType([string|bool $user_type_id = false ]) : array<string|int, mixed>|bool
If this is the first call to the function, the system event OnUserTypeBuildList (main) is executed. Registered handlers must return the type description data. In this case, the rule applies - the last one is the boss. (in case one type is registered to be handled by "several" classes)
Without parameters, the function returns a complete list of types.
When a user_type_id is specified, it returns an array if such a type is registered and false if not.
Parameters
- $user_type_id : string|bool = false
-
Optional. Property type identifier.
Return values
array<string|int, mixed>|boolgetUtmDBColumnType()
public
getUtmDBColumnType(mixed $arUserField) : mixed
Parameters
- $arUserField : mixed
getUtsDBColumnType()
public
getUtsDBColumnType(mixed $arUserField) : mixed
Parameters
- $arUserField : mixed
IsNotEmpty()
public
IsNotEmpty(mixed $value) : mixed
Parameters
- $value : mixed
LoadMultipleValues()
public
LoadMultipleValues(mixed $arUserField, mixed $valueId) : mixed
Parameters
- $arUserField : mixed
- $valueId : mixed
OnAfterFetch()
public
OnAfterFetch(mixed $arUserField, mixed $result) : mixed
Parameters
- $arUserField : mixed
- $result : mixed
OnEntityDelete()
public
OnEntityDelete(mixed $entity_id) : mixed
Parameters
- $entity_id : mixed
OnSearchIndex()
public
OnSearchIndex(mixed $entity_id, mixed $ID) : mixed
Parameters
- $entity_id : mixed
- $ID : mixed
PrepareSettings()
public
PrepareSettings(mixed $ID, mixed $arUserField[, mixed $bCheckUserType = true ]) : mixed
Parameters
- $ID : mixed
- $arUserField : mixed
- $bCheckUserType : mixed = true
renderField()
public
renderField(array<string|int, mixed> $userField[, array<string|int, mixed>|null $additionalParameters = [] ]) : string|null
Parameters
- $userField : array<string|int, mixed>
- $additionalParameters : array<string|int, mixed>|null = []
Return values
string|nullShowScript()
public
ShowScript() : mixed
Update()
public
Update(mixed $entity_id, mixed $ID, mixed $arFields[, mixed $user_id = false ]) : mixed
Parameters
- $entity_id : mixed
- $ID : mixed
- $arFields : mixed
- $user_id : mixed = false