You are here

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

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\Resolver
View 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

Namesort descending Modifiers Type Description Overrides
ChainTaxRateResolverInterface::addResolver public function Adds a resolver. 1
ChainTaxRateResolverInterface::getResolvers public function Gets all added resolvers. 1
TaxRateResolverInterface::NO_APPLICABLE_TAX_RATE constant
TaxRateResolverInterface::resolve public function Resolves the tax rate for the given tax zone. 3
TaxTypeAwareInterface::setTaxType public function Sets the tax type.