You are here

interface ChainOrderTypeResolverInterface in Commerce Core 8.2

Runs the added resolvers one by one until one of them returns the order type.

Each resolver in the chain can be another chain, which is why this interface extends the order type resolver one.

Hierarchy

Expanded class hierarchy of ChainOrderTypeResolverInterface

All classes that implement ChainOrderTypeResolverInterface

1 file declares its use of ChainOrderTypeResolverInterface
PriceCalculator.php in modules/order/src/PriceCalculator.php

File

modules/order/src/Resolver/ChainOrderTypeResolverInterface.php, line 11

Namespace

Drupal\commerce_order\Resolver
View source
interface ChainOrderTypeResolverInterface extends OrderTypeResolverInterface {

  /**
   * Adds a resolver.
   *
   * @param \Drupal\commerce_order\Resolver\OrderTypeResolverInterface $resolver
   *   The resolver.
   */
  public function addResolver(OrderTypeResolverInterface $resolver);

  /**
   * Gets all added resolvers.
   *
   * @return \Drupal\commerce_order\Resolver\OrderTypeResolverInterface[]
   *   The resolvers.
   */
  public function getResolvers();

}

Members

Namesort descending Modifiers Type Description Overrides
ChainOrderTypeResolverInterface::addResolver public function Adds a resolver. 1
ChainOrderTypeResolverInterface::getResolvers public function Gets all added resolvers. 1
OrderTypeResolverInterface::resolve public function Resolves the order type. 2