1
|
|
|
<?php |
2
|
|
|
/*************************************************************************************/ |
3
|
|
|
/* This file is part of the module AttributeType */ |
4
|
|
|
/* */ |
5
|
|
|
/* For the full copyright and license information, please view the LICENSE.txt */ |
6
|
|
|
/* file that was distributed with this source code. */ |
7
|
|
|
/*************************************************************************************/ |
8
|
|
|
|
9
|
|
|
namespace AttributeType\Event; |
10
|
|
|
|
11
|
|
|
use AttributeType\Model\AttributeType; |
12
|
|
|
use Propel\Runtime\Connection\ConnectionInterface; |
13
|
|
|
use Thelia\Core\Event\ActionEvent; |
14
|
|
|
use Thelia\Model\Attribute; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Class AttributeTypeEvent |
18
|
|
|
* @package AttributeType\Event |
19
|
|
|
* @author Gilles Bourgeat <[email protected]> |
20
|
|
|
*/ |
21
|
|
|
class AttributeTypeEvent extends ActionEvent |
22
|
|
|
{ |
23
|
|
|
/** @var ConnectionInterface|null */ |
24
|
|
|
protected $connectionInterface = null; |
25
|
|
|
|
26
|
|
|
/** @var AttributeType */ |
27
|
|
|
protected $attributeType = null; |
28
|
|
|
|
29
|
|
|
/** @var Attribute|null */ |
30
|
|
|
protected $attribute = null; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @param AttributeType $attributeType |
34
|
|
|
*/ |
35
|
|
|
public function __construct(AttributeType $attributeType) |
36
|
|
|
{ |
37
|
|
|
$this->attributeType = $attributeType; |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @return AttributeType |
42
|
|
|
*/ |
43
|
|
|
public function getAttributeType() |
44
|
|
|
{ |
45
|
|
|
return $this->attributeType; |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @param $attributeType |
50
|
|
|
* @return $this |
51
|
|
|
*/ |
52
|
|
|
public function setAttributeType(AttributeType $attributeType) |
53
|
|
|
{ |
54
|
|
|
$this->attributeType = $attributeType; |
55
|
|
|
|
56
|
|
|
return $this; |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* @return null|Attribute |
61
|
|
|
*/ |
62
|
|
|
public function getAttribute() |
63
|
|
|
{ |
64
|
|
|
return $this->attribute; |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @param Attribute $attribute |
69
|
|
|
* @return $this |
70
|
|
|
*/ |
71
|
|
|
public function setAttribute(Attribute $attribute) |
72
|
|
|
{ |
73
|
|
|
$this->attribute = $attribute; |
74
|
|
|
|
75
|
|
|
return $this; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @return null|ConnectionInterface |
80
|
|
|
*/ |
81
|
|
|
public function getConnectionInterface() |
82
|
|
|
{ |
83
|
|
|
return $this->connectionInterface; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @param ConnectionInterface $connectionInterface |
88
|
|
|
* @return $this |
89
|
|
|
*/ |
90
|
|
|
public function setConnectionInterface(ConnectionInterface $connectionInterface) |
91
|
|
|
{ |
92
|
|
|
$this->connectionInterface = $connectionInterface; |
93
|
|
|
|
94
|
|
|
return $this; |
95
|
|
|
} |
96
|
|
|
} |
97
|
|
|
|