interface ChainPriceResolverInterface in Price 2.0.x
Runs the added resolvers one by one until one of them returns the price.
Each resolver in the chain can be another chain, which is why this interface extends the base price resolver one.
Hierarchy
- interface \Drupal\price\Resolver\PriceResolverInterface
- interface \Drupal\price\Resolver\ChainPriceResolverInterface
Expanded class hierarchy of ChainPriceResolverInterface
All classes that implement ChainPriceResolverInterface
1 file declares its use of ChainPriceResolverInterface
- PriceCalculatedFormatter.php in src/
Plugin/ Field/ FieldFormatter/ PriceCalculatedFormatter.php
File
- src/
Resolver/ ChainPriceResolverInterface.php, line 11
Namespace
Drupal\price\ResolverView source
interface ChainPriceResolverInterface extends PriceResolverInterface {
/**
* Adds a resolver.
*
* @param \Drupal\price\Resolver\PriceResolverInterface $resolver
* The resolver.
*/
public function addResolver(PriceResolverInterface $resolver);
/**
* Gets all added resolvers.
*
* @return \Drupal\price\Resolver\PriceResolverInterface[]
* The resolvers.
*/
public function getResolvers();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ChainPriceResolverInterface:: |
public | function | Adds a resolver. | 1 |
ChainPriceResolverInterface:: |
public | function | Gets all added resolvers. | 1 |
PriceResolverInterface:: |
public | function | Resolves a price for the given purchasable entity. | 2 |