class ProductVariationEvent in Commerce Core 8.2
Defines the product variation event.
Hierarchy
- class \Drupal\commerce\EventBase extends \Drupal\Component\EventDispatcher\Event
- class \Drupal\commerce_product\Event\ProductVariationEvent
Expanded class hierarchy of ProductVariationEvent
See also
\Drupal\commerce_product\Event\ProductEvents
File
- modules/
product/ src/ Event/ ProductVariationEvent.php, line 13
Namespace
Drupal\commerce_product\EventView source
class ProductVariationEvent extends EventBase {
/**
* The product variation.
*
* @var \Drupal\commerce_product\Entity\ProductVariationInterface
*/
protected $productVariation;
/**
* Constructs a new ProductVariationEvent.
*
* @param \Drupal\commerce_product\Entity\ProductVariationInterface $product_variation
* The product variation.
*/
public function __construct(ProductVariationInterface $product_variation) {
$this->productVariation = $product_variation;
}
/**
* Gets the product variation.
*
* @return \Drupal\commerce_product\Entity\ProductVariationInterface
* The product variation.
*/
public function getProductVariation() {
return $this->productVariation;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ProductVariationEvent:: |
protected | property | The product variation. | |
ProductVariationEvent:: |
public | function | Gets the product variation. | |
ProductVariationEvent:: |
public | function | Constructs a new ProductVariationEvent. |