public function ChainCountryResolver::resolve in Price 3.x
Same name and namespace in other branches
- 8 src/Resolver/ChainCountryResolver.php \Drupal\price\Resolver\ChainCountryResolver::resolve()
- 2.0.x src/Resolver/ChainCountryResolver.php \Drupal\price\Resolver\ChainCountryResolver::resolve()
- 2.x src/Resolver/ChainCountryResolver.php \Drupal\price\Resolver\ChainCountryResolver::resolve()
- 3.0.x src/Resolver/ChainCountryResolver.php \Drupal\price\Resolver\ChainCountryResolver::resolve()
Resolves the country.
Return value
\Drupal\price\Country|null The country object, if resolved. Otherwise NULL, indicating that the next resolver in the chain should be called.
Overrides CountryResolverInterface::resolve
File
- src/
Resolver/ ChainCountryResolver.php, line 44
Class
- ChainCountryResolver
- Default implementation of the chain country resolver.
Namespace
Drupal\price\ResolverCode
public function resolve() {
foreach ($this->resolvers as $resolver) {
$result = $resolver
->resolve();
if ($result) {
return $result;
}
}
}