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