You are here

class ProductAttributeValueEvent in Commerce Core 8.2

Defines the product attribute value event.

Hierarchy

Expanded class hierarchy of ProductAttributeValueEvent

See also

\Drupal\commerce_product\Event\ProductEvents

File

modules/product/src/Event/ProductAttributeValueEvent.php, line 13

Namespace

Drupal\commerce_product\Event
View source
class ProductAttributeValueEvent extends EventBase {

  /**
   * The product attribute value.
   *
   * @var \Drupal\commerce_product\Entity\ProductAttributeValueInterface
   */
  protected $attributeValue;

  /**
   * Constructs a new ProductAttributeValueEvent.
   *
   * @param \Drupal\commerce_product\Entity\ProductAttributeValueInterface $attribute_value
   *   The product attribute value.
   */
  public function __construct(ProductAttributeValueInterface $attribute_value) {
    $this->attributeValue = $attribute_value;
  }

  /**
   * Gets the product attribute value.
   *
   * @return \Drupal\commerce_product\Entity\ProductAttributeValueInterface
   *   The product attribute value.
   */
  public function getAttributeValue() {
    return $this->attributeValue;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ProductAttributeValueEvent::$attributeValue protected property The product attribute value.
ProductAttributeValueEvent::getAttributeValue public function Gets the product attribute value.
ProductAttributeValueEvent::__construct public function Constructs a new ProductAttributeValueEvent.