interface ChainTaxRateResolverInterface in Commerce Core 8.2
Runs the added resolvers one by one until one of them returns the tax rate.
Each resolver in the chain can be another chain, which is why this interface extends the tax rate resolver one.
Hierarchy
- interface \Drupal\commerce_tax\Resolver\TaxRateResolverInterface; interface \Drupal\commerce_tax\Resolver\TaxTypeAwareInterface
- interface \Drupal\commerce_tax\Resolver\ChainTaxRateResolverInterface
Expanded class hierarchy of ChainTaxRateResolverInterface
All classes that implement ChainTaxRateResolverInterface
3 files declare their use of ChainTaxRateResolverInterface
- Custom.php in modules/
tax/ src/ Plugin/ Commerce/ TaxType/ Custom.php - LocalTaxTypeBase.php in modules/
tax/ src/ Plugin/ Commerce/ TaxType/ LocalTaxTypeBase.php - StoreTax.php in modules/
tax/ src/ StoreTax.php
File
- modules/
tax/ src/ Resolver/ ChainTaxRateResolverInterface.php, line 11
Namespace
Drupal\commerce_tax\ResolverView source
interface ChainTaxRateResolverInterface extends TaxRateResolverInterface, TaxTypeAwareInterface {
/**
* Adds a resolver.
*
* @param \Drupal\commerce_tax\Resolver\TaxRateResolverInterface $resolver
* The resolver.
*/
public function addResolver(TaxRateResolverInterface $resolver);
/**
* Gets all added resolvers.
*
* @return \Drupal\commerce_tax\Resolver\TaxRateResolverInterface[]
* The resolvers.
*/
public function getResolvers();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ChainTaxRateResolverInterface:: |
public | function | Adds a resolver. | 1 |
ChainTaxRateResolverInterface:: |
public | function | Gets all added resolvers. | 1 |
TaxRateResolverInterface:: |
constant | |||
TaxRateResolverInterface:: |
public | function | Resolves the tax rate for the given tax zone. | 3 |
TaxTypeAwareInterface:: |
public | function | Sets the tax type. |