|
@@ -0,0 +1,97 @@
|
|
1
|
+<?php
|
|
2
|
+
|
|
3
|
+namespace Muzich\CoreBundle\Entity;
|
|
4
|
+
|
|
5
|
+use Doctrine\ORM\Mapping as ORM;
|
|
6
|
+
|
|
7
|
+/**
|
|
8
|
+ * @ORM\Entity
|
|
9
|
+ * @ORM\Table(name="element_type")
|
|
10
|
+ */
|
|
11
|
+class ElementType
|
|
12
|
+{
|
|
13
|
+
|
|
14
|
+ /**
|
|
15
|
+ * @ORM\OneToMany(targetEntity="Element", mappedBy="element_type")
|
|
16
|
+ */
|
|
17
|
+ protected $elements;
|
|
18
|
+
|
|
19
|
+ /**
|
|
20
|
+ * @ORM\Id
|
|
21
|
+ * @ORM\Column(type="string", length=12)
|
|
22
|
+ * @var type string
|
|
23
|
+ */
|
|
24
|
+ protected $id;
|
|
25
|
+
|
|
26
|
+ /**
|
|
27
|
+ * @ORM\Column(type="string", length=128)
|
|
28
|
+ * @var type string
|
|
29
|
+ */
|
|
30
|
+ protected $name;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+ /**
|
|
34
|
+ * Set name
|
|
35
|
+ *
|
|
36
|
+ * @param string $name
|
|
37
|
+ */
|
|
38
|
+ public function setName($name)
|
|
39
|
+ {
|
|
40
|
+ $this->name = $name;
|
|
41
|
+ }
|
|
42
|
+
|
|
43
|
+ /**
|
|
44
|
+ * Get name
|
|
45
|
+ *
|
|
46
|
+ * @return string
|
|
47
|
+ */
|
|
48
|
+ public function getName()
|
|
49
|
+ {
|
|
50
|
+ return $this->name;
|
|
51
|
+ }
|
|
52
|
+
|
|
53
|
+ /**
|
|
54
|
+ * Set id
|
|
55
|
+ *
|
|
56
|
+ * @param string $id
|
|
57
|
+ */
|
|
58
|
+ public function setId($id)
|
|
59
|
+ {
|
|
60
|
+ $this->id = $id;
|
|
61
|
+ }
|
|
62
|
+
|
|
63
|
+ /**
|
|
64
|
+ * Get id
|
|
65
|
+ *
|
|
66
|
+ * @return string
|
|
67
|
+ */
|
|
68
|
+ public function getId()
|
|
69
|
+ {
|
|
70
|
+ return $this->id;
|
|
71
|
+ }
|
|
72
|
+
|
|
73
|
+ /**
|
|
74
|
+ * Add elements
|
|
75
|
+ *
|
|
76
|
+ * @param Muzich\CoreBundle\Entity\Element $elements
|
|
77
|
+ */
|
|
78
|
+ public function addElement(\Muzich\CoreBundle\Entity\Element $elements)
|
|
79
|
+ {
|
|
80
|
+ $this->elements[] = $elements;
|
|
81
|
+ }
|
|
82
|
+
|
|
83
|
+ /**
|
|
84
|
+ * Get elements
|
|
85
|
+ *
|
|
86
|
+ * @return Doctrine\Common\Collections\Collection
|
|
87
|
+ */
|
|
88
|
+ public function getElements()
|
|
89
|
+ {
|
|
90
|
+ return $this->elements;
|
|
91
|
+ }
|
|
92
|
+
|
|
93
|
+ public function __construct()
|
|
94
|
+ {
|
|
95
|
+ $this->elements = new ArrayCollection();
|
|
96
|
+ }
|
|
97
|
+}
|