public function CurrentCountry::__construct in Price 8
Same name and namespace in other branches
- 3.x src/CurrentCountry.php \Drupal\price\CurrentCountry::__construct()
- 2.0.x src/CurrentCountry.php \Drupal\price\CurrentCountry::__construct()
- 2.x src/CurrentCountry.php \Drupal\price\CurrentCountry::__construct()
- 3.0.x src/CurrentCountry.php \Drupal\price\CurrentCountry::__construct()
Constructs a new CurrentCountry object.
Parameters
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
\Drupal\price\Resolver\ChainCountryResolverInterface $chain_resolver: The chain resolver.
File
- src/
CurrentCountry.php, line 50
Class
- CurrentCountry
- Holds a reference to the current country, resolved on demand.
Namespace
Drupal\priceCode
public function __construct(RequestStack $request_stack, ChainCountryResolverInterface $chain_resolver) {
$this->requestStack = $request_stack;
$this->chainResolver = $chain_resolver;
$this->countries = new \SplObjectStorage();
}