1 | <?php |
||
12 | class TagElement |
||
13 | { |
||
14 | /** |
||
15 | * @var int |
||
16 | * |
||
17 | * @ORM\Column(type="integer") |
||
18 | * @ORM\Id |
||
19 | * @ORM\GeneratedValue(strategy="AUTO") |
||
20 | */ |
||
21 | protected $id; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | * |
||
26 | * @Assert\NotBlank |
||
27 | * @ORM\Column(type="string", length=255) |
||
28 | */ |
||
29 | protected $name; |
||
30 | |||
31 | /** |
||
32 | * @var News |
||
33 | * |
||
34 | * @ORM\ManyToOne(targetEntity="Tag", inversedBy="elements") |
||
35 | */ |
||
36 | protected $tag; |
||
37 | |||
38 | /** |
||
39 | * @return int |
||
40 | */ |
||
41 | public function getId() |
||
42 | { |
||
43 | return $this->id; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @param int $id |
||
48 | */ |
||
49 | public function setId($id) |
||
50 | { |
||
51 | $this->id = $id; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getName() |
||
58 | { |
||
59 | return $this->name; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @param string $name |
||
64 | */ |
||
65 | public function setName($name) |
||
66 | { |
||
67 | $this->name = $name; |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @return News |
||
72 | */ |
||
73 | public function getTag() |
||
74 | { |
||
75 | return $this->tag; |
||
76 | } |
||
77 | |||
78 | /** |
||
79 | * @param News $tag |
||
80 | */ |
||
81 | public function setTag($tag = null) |
||
82 | { |
||
83 | $this->tag = $tag; |
||
84 | } |
||
85 | } |
||
86 |