public function DefaultLocaleResolver::__construct in Price 2.x
Same name and namespace in other branches
- 8 src/Resolver/DefaultLocaleResolver.php \Drupal\price\Resolver\DefaultLocaleResolver::__construct()
- 3.x src/Resolver/DefaultLocaleResolver.php \Drupal\price\Resolver\DefaultLocaleResolver::__construct()
- 2.0.x src/Resolver/DefaultLocaleResolver.php \Drupal\price\Resolver\DefaultLocaleResolver::__construct()
- 3.0.x src/Resolver/DefaultLocaleResolver.php \Drupal\price\Resolver\DefaultLocaleResolver::__construct()
Constructs a new DefaultLocaleResolver object.
Parameters
\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.
\Drupal\price\CurrentCountryInterface $current_country: The current country.
File
- src/
Resolver/ DefaultLocaleResolver.php, line 36
Class
- DefaultLocaleResolver
- Returns the locale based on the current language and country.
Namespace
Drupal\price\ResolverCode
public function __construct(LanguageManagerInterface $language_manager, CurrentCountryInterface $current_country) {
$this->languageManager = $language_manager;
$this->currentCountry = $current_country;
}