Class PromotionTypeHandler
Provides the capability to show or hide specific promotion types that inherit from Promotion
Inheritance
Namespace: EPiServer.Commerce.Marketing
Assembly: EPiServer.Business.Commerce.dll
Version: 14.26.0Syntax
public class PromotionTypeHandler : Object
Constructors
PromotionTypeHandler(IContentTypeRepository, ITypeScannerLookup)
Creates an instance of Promotion
Declaration
public PromotionTypeHandler(IContentTypeRepository contentTypeRepository, ITypeScannerLookup typeScannerLookup)
Parameters
Type | Name | Description |
---|---|---|
EPi |
contentTypeRepository | The content type repository. |
EPi |
typeScannerLookup | The type scanner lookup. |
Methods
DisableBuiltinPromotions()
Disables all built-in promotion types that inherit from Promotion
Declaration
public void DisableBuiltinPromotions()
DisablePromotions(IEnumerable<Type>)
Disables specific promotions which inherit from Promotion
Declaration
public void DisablePromotions(IEnumerable<Type> promotionTypes)
Parameters
Type | Name | Description |
---|---|---|
System. |
promotionTypes | The collection of promotion types that need to be disabled. |
Remarks
The promotion types must inherit from Promotion
EnablePromotions(IEnumerable<Type>)
Enables specific promotions which inherit from Promotion
Declaration
public void EnablePromotions(IEnumerable<Type> promotionTypes)
Parameters
Type | Name | Description |
---|---|---|
System. |
promotionTypes | The collection of promotion types that need to be enabled. |
Remarks
The promotion types must inherit from Promotion
GetAllPromotionTypes()
Gets all promotion types that inherit from Promotion
Declaration
public IEnumerable<Type> GetAllPromotionTypes()
Returns
Type | Description |
---|---|
System. |
The collection of promotion types. |
Remarks
The abstract types are not included.