Table of Contents

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

TPromotionSchedule
TPromotionEditSection
Inheritance
object
PromotionEditGeneralBase<TPromotionSchedule, TPromotionEditSection>
Implements
Derived
Inherited Members
Extension Methods

Constructors

PromotionEditGeneralBase(IFormComponentMapper, IFormDataBinder, IAuthenticatedUserAccessor, IPageLinkGenerator)

protected PromotionEditGeneralBase(IFormComponentMapper formComponentMapper, IFormDataBinder formDataBinder, IAuthenticatedUserAccessor authenticatedUserAccessor, IPageLinkGenerator pageLinkGenerator)

Parameters

formComponentMapper IFormComponentMapper

Form component mapper.

formDataBinder IFormDataBinder

Form data binder.

authenticatedUserAccessor IAuthenticatedUserAccessor

Authenticated user accessor.

pageLinkGenerator IPageLinkGenerator

Page 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

PromotionType

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

infoObject PromotionInfo

Info object to be set.

fieldValueProvider IFormFieldValueProvider

Provider of form field values.

cancellationToken CancellationToken

The 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.