public function CurrentCountry::__construct in Commerce Core 8.2
Constructs a new CurrentCountry object.
Parameters
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
\Drupal\commerce\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\commerceCode
public function __construct(RequestStack $request_stack, ChainCountryResolverInterface $chain_resolver) {
$this->requestStack = $request_stack;
$this->chainResolver = $chain_resolver;
$this->countries = new \SplObjectStorage();
}