1 | <?php |
||
32 | class Material |
||
33 | { |
||
34 | /** |
||
35 | * @var int |
||
36 | * |
||
37 | * @ORM\Column(name="id", type="integer") |
||
38 | * @ORM\Id |
||
39 | * @ORM\GeneratedValue(strategy="AUTO") |
||
40 | */ |
||
41 | private $id; |
||
42 | |||
43 | /** |
||
44 | * @var string |
||
45 | * |
||
46 | * @ORM\Column(name="name", type="string", unique=true) |
||
47 | */ |
||
48 | private $name; |
||
49 | |||
50 | /** |
||
51 | * @var string|\AppBundle\Entity\UnitStorage Unité de stockage |
||
52 | * |
||
53 | * @ORM\ManyToOne(targetEntity="AppBundle\Entity\UnitStorage") |
||
54 | */ |
||
55 | private $unitStorage; |
||
56 | |||
57 | /** |
||
58 | * @var bool |
||
59 | * |
||
60 | * @ORM\Column(name="active", type="boolean") |
||
61 | */ |
||
62 | private $active; |
||
63 | |||
64 | /** |
||
65 | * @var bool |
||
66 | * |
||
67 | * @ORM\Column(name="multiple", type="boolean") |
||
68 | */ |
||
69 | private $multiple; |
||
70 | |||
71 | /** |
||
72 | * @var \Doctrine\Common\Collections\ArrayCollection Article(s) |
||
73 | * |
||
74 | * @ORM\ManyToMany(targetEntity="AppBundle\Entity\Article") |
||
75 | * @ORM\JoinTable(name="gs_material_article") |
||
76 | * @Assert\NotBlank() |
||
77 | */ |
||
78 | private $articles; |
||
79 | |||
80 | /** |
||
81 | * @Gedmo\Slug(fields={"name"}, updatable=false) |
||
82 | * @ORM\Column(length=128, unique=true) |
||
83 | */ |
||
84 | private $slug; |
||
85 | |||
86 | |||
87 | /** |
||
88 | * Constructor. |
||
89 | */ |
||
90 | public function __construct() |
||
94 | |||
95 | /** |
||
96 | * Get id |
||
97 | * |
||
98 | * @return integer |
||
99 | */ |
||
100 | public function getId() |
||
104 | |||
105 | /** |
||
106 | * Set name |
||
107 | * |
||
108 | * @param string $name |
||
109 | * @return Material |
||
110 | */ |
||
111 | public function setName($name) |
||
117 | |||
118 | /** |
||
119 | * Get name |
||
120 | * |
||
121 | * @return string |
||
122 | */ |
||
123 | public function getName() |
||
127 | |||
128 | /** |
||
129 | * Set active |
||
130 | * |
||
131 | * @param boolean $active |
||
132 | * @return Material |
||
133 | */ |
||
134 | public function setActive($active) |
||
140 | |||
141 | /** |
||
142 | * Get active |
||
143 | * |
||
144 | * @return boolean |
||
145 | */ |
||
146 | public function isActive() |
||
150 | |||
151 | /** |
||
152 | * Set multiple |
||
153 | * |
||
154 | * @param boolean $multiple |
||
155 | * @return Material |
||
156 | */ |
||
157 | public function setMultiple($multiple) |
||
163 | |||
164 | /** |
||
165 | * Get multiple |
||
166 | * |
||
167 | * @return boolean |
||
168 | */ |
||
169 | public function isMultiple() |
||
173 | |||
174 | /** |
||
175 | * Set unitStorage |
||
176 | * |
||
177 | * @param \AppBundle\Entity\UnitStorage $unitStorage |
||
178 | * @return Material |
||
179 | */ |
||
180 | public function setUnitStorage(UnitStorage $unitStorage = null) |
||
186 | |||
187 | /** |
||
188 | * Get unitStorage |
||
189 | * |
||
190 | * @return \AppBundle\Entity\UnitStorage |
||
191 | */ |
||
192 | public function getUnitStorage() |
||
196 | |||
197 | /** |
||
198 | * Add articles |
||
199 | * |
||
200 | * @param \AppBundle\Entity\Article $articles |
||
201 | * @return Material |
||
202 | */ |
||
203 | public function addArticle(Article $articles) |
||
209 | |||
210 | /** |
||
211 | * Remove articles |
||
212 | * |
||
213 | * @param \AppBundle\Entity\Article $articles |
||
214 | */ |
||
215 | public function removeArticle(Article $articles) |
||
219 | |||
220 | /** |
||
221 | * Get articles |
||
222 | * |
||
223 | * @return \Doctrine\Common\Collections\Collection |
||
224 | */ |
||
225 | public function getArticles() |
||
229 | |||
230 | /** |
||
231 | * Get slug |
||
232 | * |
||
233 | * @return string |
||
234 | */ |
||
235 | public function getSlug() |
||
239 | } |
||
240 |