Class PromotionEditGeneralBase<TPromotionSchedule, TPromotionEditSection>
- Namespace
- Kentico.Xperience.Admin.DigitalCommerce.UIPages
- Assembly
- Kentico.Xperience.Admin.DigitalCommerce.dll
Base class for promotion edit general page.
public abstract class PromotionEditGeneralBase<TPromotionSchedule, TPromotionEditSection> : InfoEditPage<PromotionInfo>, IPage where TPromotionSchedule : EditPageBase where TPromotionEditSection : PromotionEditSectionBase
Type Parameters
TPromotionScheduleTPromotionEditSection
- Inheritance
-
objectPromotionEditGeneralBase<TPromotionSchedule, TPromotionEditSection>
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
PromotionEditGeneralBase(IFormComponentMapper, IFormDataBinder, IAuthenticatedUserAccessor, IPageLinkGenerator)
Creates a new instance of PromotionEditGeneralBase<TPromotionSchedule, TPromotionEditSection> class.
protected PromotionEditGeneralBase(IFormComponentMapper formComponentMapper, IFormDataBinder formDataBinder, IAuthenticatedUserAccessor authenticatedUserAccessor, IPageLinkGenerator pageLinkGenerator)
Parameters
formComponentMapperIFormComponentMapperForm component mapper.
formDataBinderIFormDataBinderForm data binder.
authenticatedUserAccessorIAuthenticatedUserAccessorAuthenticated user accessor.
pageLinkGeneratorIPageLinkGeneratorPage link generator.
Properties
ObjectId
ID of the object.
[PageParameter(typeof(IntPageModelBinder))]
public override int ObjectId { get; set; }
Property Value
- int
PromotionType
Promotion type.
protected abstract PromotionType PromotionType { get; }
Property Value
Methods
ConfigurePage()
Set up page's configuration. Configures the submit action.
public override Task ConfigurePage()
Returns
- Task
DurationSettingSidePanel()
Schedule activation command.
[PageCommand(Permission = "Update")]
public Task<ICommandResponse> DurationSettingSidePanel()
Returns
- Task<ICommandResponse>
FinalizeInfoObject(PromotionInfo, IFormFieldValueProvider, CancellationToken)
Allows to modify values of infoObject before validation and saving.
protected override Task FinalizeInfoObject(PromotionInfo infoObject, IFormFieldValueProvider fieldValueProvider, CancellationToken cancellationToken)
Parameters
infoObjectPromotionInfoInfo object to be set.
fieldValueProviderIFormFieldValueProviderProvider of form field values.
cancellationTokenCancellationTokenThe cancellation instruction.
Returns
- Task
GetFormItems()
Prepares form items for editing object of the specified ObjectType.
protected override Task<ICollection<IFormItem>> GetFormItems()
Returns
- Task<ICollection<IFormItem>>
Returns the collection of form items.