1C-Bitrix 25.700.0
|
Открытые члены | |
CreatePropertyTables ($entity_id) | |
CheckFields ($ID, $arFields, $bCheckUserType=true) | |
Add ($arFields, $bCheckUserType=true) | |
Update ($ID, $arFields) | |
Delete ($ID) | |
DropEntity ($entity_id) | |
Fetch () | |
Открытые члены унаследованные от CDBResult | |
SelectedRowsCount () | |
AffectedRowsCount () | |
FieldsCount () | |
FieldName ($iCol) | |
Открытые члены унаследованные от CAllDBResult | |
__construct ($res=null) | |
__sleep () | |
NavQuery ($strSql, $cnt, $arNavStartParams, $bIgnoreErrors=false) | |
NavContinue () | |
IsNavPrint () | |
NavPrint ($title, $show_allways=false, $StyleText="text", $template_path=false) | |
GetNavPrint ($title, $show_allways=false, $StyleText="text", $template_path=false, $arDeleteParam=false) | |
ExtractFields ($strPrefix="str_", $bDoEncode=true) | |
ExtractEditFields ($strPrefix="str_") | |
GetNext ($bTextHtmlAuto=true, $use_tilda=true) | |
InitNavStartVars ($nPageSize=0, $bShowAll=true, $iNumPage=false) | |
NavStart ($nPageSize=0, $bShowAll=true, $iNumPage=false) | |
DBNavStart () | |
InitFromArray ($arr) | |
NavNext ($bSetGlobalVars=true, $strPrefix="str_", $bDoEncode=true, $bSkipEntities=true) | |
GetPageNavString ($navigationTitle, $templateName="", $showAlways=false, $parentComponent=null) | |
GetPageNavStringEx (&$navComponentObject, $navigationTitle, $templateName="", $showAlways=false, $parentComponent=null, $componentParams=[]) | |
SetUserFields ($arUserFields) |
Открытые статические члены | |
static | GetByID ($ID) |
static | GetList ($aSort=[], $aFilter=[]) |
Открытые статические члены унаследованные от CAllDBResult | |
static | NavStringForCache ($nPageSize=0, $bShowAll=true, $iNumPage=false) |
static | GetNavParams ($nPageSize=0, $bShowAll=true, $iNumPage=false) |
Защищенные статические члены | |
static | cleanCache () |
Статические защищенные данные | |
static | $cache = [] |
См. определение в файле usertype.php строка 88
Add | ( | $arFields, | |
$bCheckUserType = true ) |
Function to add a user property.
First, the instance method CheckFields is called (i.e., $this->CheckFields($arFields) ).
If the validation is successful, a check is performed to see if such a field already exists for the given entity.
Then, if necessary, tables of the form b_uts_[ENTITY_ID] and b_utm_[ENTITY_ID] are created.
After that, the metadata is saved in the database.
Only after this, the structure of the table b_uts_[ENTITY_ID] is modified.
Array arFields:
In case of an error, catch the application exception!
Values for SHOW_FILTER:
array | $arFields | Metadata of the new property |
bool | $bCheckUserType |
events PROVIDE_STORAGE - use own uf subsystem to store data (uts/utm tables)
См. определение в файле usertype.php строка 437
CheckFields | ( | $ID, | |
$arFields, | |||
$bCheckUserType = true ) |
Function to validate metadata values of user properties.
Called in Add and Update methods to check the correctness of the entered values.
Validations:
In case of an error, catch the application exception!
integer | $ID | - property identifier. 0 - for new. |
array | $arFields | Property metadata |
bool | $bCheckUserType |
@global CUserTypeManager $USER_FIELD_MANAGER
См. определение в файле usertype.php строка 328
|
staticprotected |
См. определение в файле usertype.php строка 953
CreatePropertyTables | ( | $entity_id | ) |
См. определение в файле usertype.php строка 92
Delete | ( | $ID | ) |
Function to delete a user property and all its values.
First, the property metadata is deleted.
Then, all values of multiple properties are deleted from the table of the form b_utm_[ENTITY_ID].
After that, the column is dropped from the table of the form b_uts_[ENTITY_ID].
integer | $ID | Property identifier |
events PROVIDE_STORAGE - use own uf subsystem to store data (uts/utm tables)
См. определение в файле usertype.php строка 802
DropEntity | ( | $entity_id | ) |
Function to delete ALL user properties of an entity.
First, the property metadata is deleted.
Can be called, for example, when deleting an infoblock.
Then, the tables of the form b_utm_[ENTITY_ID] and b_uts_[ENTITY_ID] are dropped.
string | $entity_id | Entity identifier |
См. определение в файле usertype.php строка 909
Fetch | ( | ) |
Fetch function.
Deserializes the SETTINGS field.
Переопределяет метод предка CAllDBResult.
См. определение в файле usertype.php строка 973
|
static |
Function to fetch metadata of a user property.
Returns an associative array of metadata that can be passed to Update.
integer | $ID | Property identifier |
См. определение в файле usertype.php строка 130
|
static |
Function to fetch metadata of user properties.
Returns CDBResult - a selection based on filter and sorting.
The aSort parameter defaults to array("SORT"=>"ASC", "ID"=>"ASC").
If LANG is passed in aFilter, language messages are additionally selected.
array | $aSort | Associative array for sorting (ID, ENTITY_ID, FIELD_NAME, SORT, USER_TYPE_ID) |
array | $aFilter | Associative array for filtering with strict matching (equals) (ID, ENTITY_ID, FIELD_NAME, USER_TYPE_ID, SORT, MULTIPLE, MANDATORY, SHOW_FILTER) |
@noinspection PhpUndefinedVariableInspection
См. определение в файле usertype.php строка 170
Update | ( | $ID, | |
$arFields ) |
Function to modify metadata of a user property.
It should be noted that for the sake of faster development, it was decided not to implement the same flexibility as in infoblocks (we will do without alters and other things for now).
First, the instance method CheckFields is called (i.e., $this->CheckFields($arFields) ).
After that, the metadata is saved in the database.
Array arFields (only what can be changed):
In case of an error, catch the application exception!
integer | $ID | Property identifier |
array | $arFields | New property metadata |
См. определение в файле usertype.php строка 659
|
staticprotected |
См. определение в файле usertype.php строка 90