-
Notifications
You must be signed in to change notification settings - Fork 252
Expand file tree
/
Copy pathProductVariationTitleGenerateEvent.php
More file actions
72 lines (62 loc) · 1.49 KB
/
ProductVariationTitleGenerateEvent.php
File metadata and controls
72 lines (62 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
namespace Drupal\commerce_product\Event;
use Drupal\commerce_product\Entity\ProductVariationInterface;
use Symfony\Component\EventDispatcher\Event;
/**
* Defines the product variation title generate event.
*
* @see \Drupal\commerce_product\Event\ProductEvents
*/
class ProductVariationTitleGenerateEvent extends Event {
/**
* The generated title.
*
* @var string
*/
protected $title;
/**
* The product variation.
*
* @var \Drupal\commerce_product\Entity\ProductVariationInterface
*/
protected $productVariation;
/**
* Constructs a new ProductVariationEvent.
*
* @param string $title
* The generated title.
* @param \Drupal\commerce_product\Entity\ProductVariationInterface $product_variation
* The product variation.
*/
public function __construct($title, ProductVariationInterface $product_variation) {
$this->title = $title;
$this->productVariation = $product_variation;
}
/**
* Gets the generated title.
*
* @return string
* The generated title.
*/
public function getTitle() {
return $this->title;
}
/**
* Updates the generated title.
*
* @param string $title
* The generated title
*/
public function setTitle($title) {
$this->title = $title;
}
/**
* Gets the product variation.
*
* @return \Drupal\commerce_product\Entity\ProductVariationInterface
* The product variation.
*/
public function getProductVariation() {
return $this->productVariation;
}
}