Class FormBuilderTab
- Namespace
- Kentico.Xperience.Admin.DigitalMarketing.UIPages
- Assembly
- Kentico.Xperience.Admin.DigitalMarketing.dll
Page for the form builder.
public sealed class FormBuilderTab : Page<FormBuilderTabClientProperties>, IPage
- Inheritance
-
objectFormBuilderTab
- Implements
- Inherited Members
- Extension Methods
Constructors
FormBuilderTab(ISectionDefinitionProvider, IFormComponentDefinitionProvider, IFormItemCollectionProvider, IFormComponentCommandInvoker, IFormDataBinder, IHttpContextAccessor, IAuthenticatedUserAccessor, IContactMappingFieldsProvider, IUIPermissionEvaluator)
Initializes an instance of the FormBuilderTab class.
public FormBuilderTab(ISectionDefinitionProvider sectionDefinitionProvider, IFormComponentDefinitionProvider formComponentDefinitionProvider, IFormItemCollectionProvider formItemCollectionProvider, IFormComponentCommandInvoker formComponentCommandInvoker, IFormDataBinder formDataBinder, IHttpContextAccessor httpContextAccessor, IAuthenticatedUserAccessor authenticatedUserAccessor, IContactMappingFieldsProvider contactMappingOptionsProvider, IUIPermissionEvaluator permissionEvaluator)
Parameters
sectionDefinitionProvider
ISectionDefinitionProviderProvider for retrieval of registered section definitions for Form Builder.
formComponentDefinitionProvider
IFormComponentDefinitionProviderProvider for retrieval of registered component definitions for Form Builder.
formItemCollectionProvider
IFormItemCollectionProviderProvider that retrieves collection of form items based on a model object.
formComponentCommandInvoker
IFormComponentCommandInvokerForm component command invoker.
formDataBinder
IFormDataBinderForm data binder.
httpContextAccessor
IHttpContextAccessorHTTP context accessor to obtain request service provider from.
authenticatedUserAccessor
IAuthenticatedUserAccessorCurrently logged in user accessor.
contactMappingOptionsProvider
IContactMappingFieldsProviderProvider for contact fields that can be used for mapping.
permissionEvaluator
IUIPermissionEvaluatorUI permission evaluator.
Properties
ObjectId
ID of the edited form.
[PageParameter(typeof(IntPageModelBinder))]
public int ObjectId { get; set; }
Property Value
- int
Methods
ComponentCommand(FormComponentCommandModel, CancellationToken)
Handles the form component command invocation.
public Task<object> ComponentCommand(FormComponentCommandModel commandModel, CancellationToken cancellationToken)
Parameters
commandModel
FormComponentCommandModelForm component command arguments.
cancellationToken
CancellationTokenThe cancellation instruction.
Returns
- Task<object>
Returns the form component command result.
ConfigureTemplateProperties(FormBuilderTabClientProperties)
Gets the object representing client side template properties.
public override Task<FormBuilderTabClientProperties> ConfigureTemplateProperties(FormBuilderTabClientProperties properties)
Parameters
properties
FormBuilderTabClientPropertiesInitialized properties object.
Returns
GetFormItems(ComponentPropertiesGetFormItemsCommandArgs)
Returns a collection of editing form items for given component specified by Identifier property of arguments
to feed the Form.tsx with them.
public Task<ICommandResponse<IEnumerable<IFormItemClientProperties>>> GetFormItems(ComponentPropertiesGetFormItemsCommandArgs arguments)
Parameters
Returns
- Task<ICommandResponse<IEnumerable<IFormItemClientProperties>>>
SaveMapping(ComponentSaveMappingCommandArg)
Saves mapping options.
public Task SaveMapping(ComponentSaveMappingCommandArg arguments)
Parameters
arguments
ComponentSaveMappingCommandArg
Returns
- Task
ValidateComponents(ComponentPropertiesFormSubmissionCommandArgs)
Validates values of incoming collection of editing form components and returns a collection of updated form components and a flag if validation succeeded.
public Task<ICommandResponse<ComponentPropertiesFormSubmissionCommandResult>> ValidateComponents(ComponentPropertiesFormSubmissionCommandArgs arguments)
Parameters
Returns
ValidatePage()
Validates the page state prior invocation of the ConfigurePage() method.
public override Task<PageValidationResult> ValidatePage()
Returns
- Task<PageValidationResult>
ValidateSaveFormBuilderPermissions()
Checks permissions for form builder save actions.
public Task<bool> ValidateSaveFormBuilderPermissions()
Returns
- Task<bool>
Remarks
Returns true if the user has permissions to perform save action in form builder. Otherwise this command will not execute and access denied message will be shown.