/
NodeDimension.php
102 lines (90 loc) · 2 KB
/
NodeDimension.php
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
namespace Neos\ContentRepository\Domain\Model;
/*
* This file is part of the Neos.ContentRepository package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
* This package is Open Source Software. For the full copyright and license
* information, please view the LICENSE file which was distributed with this
* source code.
*/
use Doctrine\ORM\Mapping as ORM;
/**
* NOTE: This is internal only and should not be used or extended by userland code.
*
* @todo This should be renamed to NodeDimensionMapping or something else, because it's not just a dimension but a relation entity
*
* @ORM\Entity
* @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(name="nodeData_name_value",columns={"nodedata", "name", "value"})})
*/
class NodeDimension
{
/**
* @ORM\ManyToOne(inversedBy="dimensions")
* @ORM\JoinColumn(onDelete="CASCADE")
* @var NodeData
*/
protected $nodeData;
/**
* @var string
*/
protected $name;
/**
* @var string
*/
protected $value;
/**
* @param NodeData $nodeData
* @param string $name
* @param string $value
*/
public function __construct(NodeData $nodeData, $name, $value)
{
$this->nodeData = $nodeData;
$this->name = $name;
$this->value = $value;
}
/**
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string $value
*/
public function setValue($value)
{
$this->value = $value;
}
/**
* @return string
*/
public function getValue()
{
return $this->value;
}
/**
* @param NodeData $nodeData
*/
public function setNodeData($nodeData)
{
$this->nodeData = $nodeData;
}
/**
* @return NodeData
*/
public function getNodeData()
{
return $this->nodeData;
}
}