You are here

class ProductVariationEvent in Commerce Core 8.2

Defines the product variation event.

Hierarchy

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\Event
View 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

Namesort descending Modifiers Type Description Overrides
ProductVariationEvent::$productVariation protected property The product variation.
ProductVariationEvent::getProductVariation public function Gets the product variation.
ProductVariationEvent::__construct public function Constructs a new ProductVariationEvent.