1 | <?php |
||
8 | trait AttributedEntityTrait |
||
9 | { |
||
10 | /** |
||
11 | * @var Collection |
||
12 | * |
||
13 | * @ORM\ManyToMany( |
||
14 | * targetEntity="\Padam87\AttributeBundle\Entity\Attribute", |
||
15 | * fetch="EAGER", |
||
16 | * cascade={"persist", "remove"} |
||
17 | * ) |
||
18 | */ |
||
19 | private $attributes; |
||
20 | |||
21 | /** |
||
22 | * @param Attribute $attributes |
||
23 | * |
||
24 | * @return $this |
||
25 | */ |
||
26 | public function addAttribute(Attribute $attributes) |
||
32 | |||
33 | /** |
||
34 | * @param Attribute $attributes |
||
35 | */ |
||
36 | public function removeAttribute(Attribute $attributes) |
||
40 | |||
41 | /** |
||
42 | * @return Collection |
||
43 | */ |
||
44 | public function getAttributes() |
||
48 | } |
||
49 |