Copied!

DiscountFormMapperInterface

DiscountFormMapperInterface.php : 19
Interface

Methods

publiccreateFormData()

DiscountFormMapperInterface.php : 56
public createFormData(string $type, string $ruleType, Language $language) : CreateDiscountDataInterface

Parameters

Name Type Default value Description
$type string - -
$ruleType string - -
$language Language - -

Return values

CreateDiscountDataInterface

publicgetDiscountRuleTypes()

DiscountFormMapperInterface.php : 28

Returns identifiers for known discount form types.

public getDiscountRuleTypes(string|null $type) : array<string|int, string>

Parameters

Name Type Default value Description
$type string|null - -

Return values

array<string|int, string>

publicmapCreateDataToStruct()

DiscountFormMapperInterface.php : 35
public mapCreateDataToStruct(CreateDiscountDataInterface $data) : DiscountCreateStruct

Parameters

Name Type Default value Description
$data CreateDiscountDataInterface - -

Return values

DiscountCreateStruct

publicmapDiscountToFormData()

DiscountFormMapperInterface.php : 39
public mapDiscountToFormData(DiscountInterface $discount, Language $language) : EditDiscountDataInterface

Parameters

Name Type Default value Description
$discount DiscountInterface - -
$language Language - -

Return values

EditDiscountDataInterface

publicmapDiscountToTranslateFormData()

DiscountFormMapperInterface.php : 41
public mapDiscountToTranslateFormData(DiscountInterface $discount, Language $language[, Language|null $baseLanguage = null ]) : TranslateDiscountData

Parameters

Name Type Default value Description
$discount DiscountInterface - -
$language Language - -
$baseLanguage Language|null null -

Return values

TranslateDiscountData

publicmapEditTranslateDataToStruct()

DiscountFormMapperInterface.php : 47
public mapEditTranslateDataToStruct(DiscountInterface $discount, TranslateDiscountData $data, Language $language) : DiscountUpdateStruct

Parameters

Name Type Default value Description
$discount DiscountInterface - -
$data TranslateDiscountData - -
$language Language - -

Return values

DiscountUpdateStruct

publicmapUpdateDataToStruct()

DiscountFormMapperInterface.php : 37
public mapUpdateDataToStruct(DiscountInterface $discount, EditDiscountDataInterface $data) : DiscountUpdateStruct

Parameters

Name Type Default value Description
$discount DiscountInterface - -
$data EditDiscountDataInterface - -

Return values

DiscountUpdateStruct

publicsupports()

DiscountFormMapperInterface.php : 33
public supports(string $type, string $ruleType) : bool

Parameters

Name Type Default value Description
$type string - -
$ruleType string - -

Return values

bool