Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Class PromotionTypeHandler

Provides the capability to show or hide specific promotion types that inherit from PromotionData.

Inheritance
System.Object
PromotionTypeHandler
Namespace: EPiServer.Commerce.Marketing
Assembly: EPiServer.Business.Commerce.dll
Version: 14.26.0
Syntax
public class PromotionTypeHandler : Object

Constructors

PromotionTypeHandler(IContentTypeRepository, ITypeScannerLookup)

Creates an instance of PromotionTypeHandler.

Declaration
public PromotionTypeHandler(IContentTypeRepository contentTypeRepository, ITypeScannerLookup typeScannerLookup)
Parameters
Type Name Description
EPiServer.DataAbstraction.IContentTypeRepository contentTypeRepository

The content type repository.

EPiServer.Framework.TypeScanner.ITypeScannerLookup typeScannerLookup

The type scanner lookup.

Methods

DisableBuiltinPromotions()

Disables all built-in promotion types that inherit from PromotionData.

Declaration
public void DisableBuiltinPromotions()

DisablePromotions(IEnumerable<Type>)

Disables specific promotions which inherit from PromotionData.

Declaration
public void DisablePromotions(IEnumerable<Type> promotionTypes)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Type> promotionTypes

The collection of promotion types that need to be disabled.

Remarks

The promotion types must inherit from PromotionData.

EnablePromotions(IEnumerable<Type>)

Enables specific promotions which inherit from PromotionData.

Declaration
public void EnablePromotions(IEnumerable<Type> promotionTypes)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Type> promotionTypes

The collection of promotion types that need to be enabled.

Remarks

The promotion types must inherit from PromotionData.

GetAllPromotionTypes()

Gets all promotion types that inherit from PromotionData.

Declaration
public IEnumerable<Type> GetAllPromotionTypes()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Type>

The collection of promotion types.

Remarks

The abstract types are not included.