public function VariationAddToCartFormatter::setCurrentRequest in Commerce Variation Add to Cart 8
Sets the current request.
Parameters
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
File
- src/
Plugin/ Field/ FieldFormatter/ VariationAddToCartFormatter.php, line 70
Class
- VariationAddToCartFormatter
- Plugin implementation of the 'variation_add_to_cart_form' formatter.
Namespace
Drupal\commerce_variation_add_to_cart\Plugin\Field\FieldFormatterCode
public function setCurrentRequest(RequestStack $request_stack) {
$this->currentRequest = $request_stack
->getCurrentRequest();
}