[Documentation][CatalogPromotion] Adjust docs after removing getType method

This commit is contained in:
Grzegorz Sadowski 2021-12-17 13:34:56 +01:00
parent 2b9dfcca4a
commit ae22bff905
No known key found for this signature in database
GPG key ID: EF87FF4E6E3BD364
2 changed files with 2 additions and 12 deletions

View file

@ -23,7 +23,7 @@ We should start from creating a calculator that will return a proper price for g
App\Calculator\FixedPriceCalculator:
tags:
- { name: 'sylius.catalog_promotion.price_calculator' }
- { name: 'sylius.catalog_promotion.price_calculator', type: 'fixed_price' }
.. note::
@ -48,11 +48,6 @@ And the code for the calculator itself:
{
public const TYPE = 'fixed_price';
public static function getType(): string
{
return self::TYPE;
}
public function supports(BaseCatalogPromotionActionInterface $action): bool
{
return $action->getType() === self::TYPE;

View file

@ -25,7 +25,7 @@ We should start from creating a provider that will return for us all of eligible
arguments:
- '@sylius.repository.product_variant'
tags:
- { name: 'sylius.catalog_promotion.variants_provider' }
- { name: 'sylius.catalog_promotion.variants_provider', type: 'by_phrase' }
.. note::
@ -55,11 +55,6 @@ And the code for the provider itself:
$this->productVariantRepository = $productVariantRepository;
}
public static function getType(): string
{
return self::TYPE;
}
public function supports(CatalogPromotionScopeInterface $catalogPromotionScopeType): bool
{
return $catalogPromotionScopeType->getType() === self::TYPE;