You are here

interface ChainStoreResolverInterface in Commerce Core 8.2

Runs the added resolvers one by one until one of them returns the store.

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

Hierarchy

Expanded class hierarchy of ChainStoreResolverInterface

All classes that implement ChainStoreResolverInterface

1 file declares its use of ChainStoreResolverInterface
CurrentStore.php in modules/store/src/CurrentStore.php

File

modules/store/src/Resolver/ChainStoreResolverInterface.php, line 11

Namespace

Drupal\commerce_store\Resolver
View source
interface ChainStoreResolverInterface extends StoreResolverInterface {

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

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

}

Members

Namesort descending Modifiers Type Description Overrides
ChainStoreResolverInterface::addResolver public function Adds a resolver. 1
ChainStoreResolverInterface::getResolvers public function Gets all added resolvers. 1
StoreResolverInterface::resolve public function Resolves the store. 3