User fields settings factory
Description and methods
This extension contains fragments of interfaces and logic, required for managing user field settings.
Main class for handling this extension
BX.UI.UserFieldFactory.Factory
Method | Description | Available from version |
---|---|---|
constructor(entityId: string, params: {}) | Constructor.
Parameters:
| |
getFieldTypes(): Array | Method returns array with field types with description.
Each item has the following structure:
| |
getMenu(params: {}): CreationMenu | Method returns object CreationMenu.
| |
setConfiguratorClass(configuratorClassName: string|Function) | Sets name for descendant class Configurator to be used instead of standard class. | |
setCustomTypesUrl(customTypesUrl: string): this | Sets page URL to be opened in slider upon clicking at Additional field type. | |
getConfigurator(params: {}): Configurator | Returns object Configurator для настройки поля userField .
| |
createUserField(fieldType: string, fieldName: ?string): UserField | Method returns new object UserField.
Parameters:
| |
getDefaultLabel(fieldType: string): string | Method returns field title by default (for new).
Parameters:
| |
generateFieldName(): string | Method generates field code based on entity and current time. | |
onCustomTypeClick() | Handler method for click at Additional field type. |
Events
Event | Description |
---|---|
namespace: BX.UI.UserFieldFactory.Factory | |
OnGetUserTypes | Event is thrown after initializing available types of user fields.
Handler receives array with list of |
onCreateField | Event is thrown after creating UserField object in the method createUserField . Handler can receive the object |
onCreateCustomUserField | Event is thrown after creating UserField object via full field settings form.The handler can be receive the object |
© «Bitrix24», 2001-2024