public function ProductVariationAjaxChangeEvent::__construct in Commerce Core 8.2
Constructs a new ProductVariationAjaxChangeEvent.
Parameters
\Drupal\commerce_product\Entity\ProductVariationInterface $product_variation: The product variation.
\Drupal\Core\Ajax\AjaxResponse $response: The ajax response.
string $view_mode: The view mode used to render the product variation.
File
- modules/
product/ src/ Event/ ProductVariationAjaxChangeEvent.php, line 47
Class
- ProductVariationAjaxChangeEvent
- Defines the product variation ajax change event.
Namespace
Drupal\commerce_product\EventCode
public function __construct(ProductVariationInterface $product_variation, AjaxResponse $response, $view_mode = 'default') {
$this->productVariation = $product_variation;
$this->response = $response;
$this->viewMode = $view_mode;
}