Class ModuleForm
Inherited Members
Namespace: DataWeb.Structure.Modules
Assembly: DataWeb.Core.dll
Syntax
public class ModuleForm : Module
Constructors
ModuleForm(Section, NavigationContext, IServiceProvider)
Declaration
public ModuleForm(Section section, NavigationContext navigationContext, IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
Section | section | |
NavigationContext | navigationContext | |
IServiceProvider | serviceProvider |
Methods
CloneAsync(Item, Item, CancellationToken)
Clones the provided item's module data to a new item.
Declaration
public override Task CloneAsync(Item item, Item itemCloned, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Item | item | The original Item to clone from. |
Item | itemCloned | The new Item to clone to. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous clone operation. |
Overrides
IsCompletedAsync(Item, Section, CancellationToken)
Determines whether the provided item is completed for the current section.
Declaration
public override Task<bool> IsCompletedAsync(Item item, Section currentSection, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Item | item | The Item being checked. |
Section | currentSection | The current Section being displayed. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<bool> | A task that represents the asynchronous check operation. The result is a boolean indicating whether the item is completed. |
Overrides
ProcessOnSaveDataAsync(Item, SectionPart, List<ProvidedValue>, CancellationToken)
Declaration
public virtual Task ProcessOnSaveDataAsync(Item item, Item.SectionPart sectionPart, List<Form.ProvidedValue> providedValues, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Item | item | |
Item.SectionPart | sectionPart | |
List<Form.ProvidedValue> | providedValues | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
SaveAsync(Item, Dictionary<string, object>, CancellationToken)
Saves the provided item data and module data.
Declaration
public override Task<ModuleSaveResult> SaveAsync(Item item, Dictionary<string, object> moduleData, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Item | item | The Item being saved. |
Dictionary<string, object> | moduleData | The module data to be saved. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<ModuleSaveResult> | A task that represents the asynchronous save operation. The result contains a ModuleSaveResult indicating whether the item was modified and which fields were modified, if any. |
Overrides
ValidateAsync(Item, Dictionary<string, object>, CancellationToken)
Validates the provided item data and module data.
Declaration
public override Task<List<ValidationError>> ValidateAsync(Item item, Dictionary<string, object> moduleData, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Item | item | The Item being validated. |
Dictionary<string, object> | moduleData | The module data to be validated. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<List<ValidationError>> | A task that represents the asynchronous validation operation. The result contains a list of validation errors, if any. |