User fields settings factory
Description and methods
This extension contains fragments of interfaces and logic, necessary for managing user fields 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 return array of field types with description.
Each element 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 address to be opened in the slider upon clicking on Additional field type. | |
getConfigurator(params: {}): Configurator | Returns object Configurator for setting up the field userField .
| |
createUserField(fieldType: string, fieldName: ?string): UserField | Returns new object UserField.
Parameters:
| |
getDefaultLabel(fieldType: string): string | Returns default field title (for new field).
Parameters:
| |
generateFieldName(): string | Generates field code based on entity and current time. | |
onCustomTypeClick() | Click handler for Additional field type. |
Events
Event | Description |
---|---|
namespace: BX.UI.UserFieldFactory.Factory | |
OnGetUserTypes | Event is thrown after initialising available types of user fields.
Handler receives array with list of |
onCreateField | Event is thrown after creating an object UserField in the method createUserField .Handler can get the object |
onCreateCustomUserField | Event is thrown after creating an object бросается UserField via the full field settings form.Handler can receive an object |
© «Bitrix24», 2001-2024