1: <?php
2: /**
3: * PHP version 5
4: * @package generalDriver
5: * @author Christian Schiffler <c.schiffler@cyberspectrum.de>
6: * @author Stefan Heimes <stefan_heimes@hotmail.com>
7: * @author Tristan Lins <tristan.lins@bit3.de>
8: * @copyright The MetaModels team.
9: * @license LGPL.
10: * @filesource
11: */
12:
13: namespace DcGeneral\DataDefinition\Palette\Builder\Event;
14:
15: use DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionChain;
16: use DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder;
17:
18: /**
19: * This event gets emitted when a property condition chain is created.
20: *
21: * @package DcGeneral\DataDefinition\Palette\Builder\Event
22: */
23: class CreatePropertyConditionChainEvent extends BuilderEvent
24: {
25: const NAME = 'dc-general.data-definition.palette.builder.create-property-condition-chain';
26:
27: /**
28: * The property condition chain.
29: *
30: * @var PropertyConditionChain
31: */
32: protected $propertyConditionChain;
33:
34: /**
35: * Create a new instance.
36: *
37: * @param PropertyConditionChain $propertyConditionChain The property condition chain that has been created.
38: *
39: * @param PaletteBuilder $paletteBuilder The palette builder in use.
40: */
41: public function __construct(PropertyConditionChain $propertyConditionChain, PaletteBuilder $paletteBuilder)
42: {
43: $this->setPropertyConditionChain($propertyConditionChain);
44: parent::__construct($paletteBuilder);
45: }
46:
47: /**
48: * Set the property condition chain.
49: *
50: * @param PropertyConditionChain $propertyConditionChain The property condition chain.
51: *
52: * @return CreatePropertyConditionChainEvent
53: */
54: public function setPropertyConditionChain(PropertyConditionChain $propertyConditionChain)
55: {
56: $this->propertyConditionChain = $propertyConditionChain;
57: return $this;
58: }
59:
60: /**
61: * Retrieve the property condition chain.
62: *
63: * @return PropertyConditionChain
64: */
65: public function getPropertyConditionChain()
66: {
67: return $this->propertyConditionChain;
68: }
69: }
70: