1 | <?php |
||
19 | class Tag |
||
20 | { |
||
21 | use NameableTrait; |
||
22 | use SeoTrait; |
||
23 | |||
24 | /** |
||
25 | * @var int |
||
26 | * |
||
27 | * @ORM\Id |
||
28 | * @ORM\Column(name="id", type="integer") |
||
29 | * @ORM\GeneratedValue(strategy="AUTO") |
||
30 | */ |
||
31 | protected $id; |
||
32 | |||
33 | /** |
||
34 | * @var ArrayCollection|Post[] |
||
35 | * |
||
36 | * @ORM\ManyToMany(targetEntity="Smart\ContentBundle\Entity\Post", mappedBy="tags") |
||
37 | */ |
||
38 | protected $posts; |
||
39 | |||
40 | 1 | public function __construct() |
|
44 | |||
45 | /** |
||
46 | * @return string |
||
47 | */ |
||
48 | public function __toString() |
||
52 | |||
53 | /** |
||
54 | * @return int |
||
55 | */ |
||
56 | public function getId() |
||
60 | |||
61 | /** |
||
62 | * @return ArrayCollection|Post[] |
||
63 | */ |
||
64 | public function getPosts() |
||
68 | |||
69 | /** |
||
70 | * @param ArrayCollection|Post[] $posts |
||
71 | * |
||
72 | * @return $this |
||
73 | */ |
||
74 | public function setPosts($posts) |
||
80 | } |
||
81 |