1 | <?php |
||
20 | class Post extends AbstractTranslateableStory |
||
21 | { |
||
22 | use DeletedByTrait; |
||
23 | |||
24 | /** |
||
25 | * @var integer |
||
26 | * |
||
27 | * @ORM\Column(name="id", type="integer") |
||
28 | * @ORM\Id |
||
29 | * @ORM\GeneratedValue(strategy="AUTO") |
||
30 | */ |
||
31 | protected $id; |
||
32 | |||
33 | /** |
||
34 | * @var ArrayCollection|PostTranslation[] |
||
35 | * |
||
36 | * @ORM\OneToMany( |
||
37 | * targetEntity="AppBundle\Entity\Translations\PostTranslation", |
||
38 | * mappedBy="object", |
||
39 | * cascade={"persist", "remove"} |
||
40 | * ) |
||
41 | */ |
||
42 | protected $translations; |
||
43 | |||
44 | /** |
||
45 | * @var ArrayCollection|GalleryHasMedia[] |
||
46 | * |
||
47 | * @ORM\ManyToMany(targetEntity="Application\Sonata\MediaBundle\Entity\GalleryHasMedia", cascade={"persist"}) |
||
48 | * @ORM\JoinTable(name="post_galleryHasMedia", |
||
49 | * joinColumns={@ORM\JoinColumn(name="post_id",referencedColumnName="id")}, |
||
50 | * inverseJoinColumns={@ORM\JoinColumn(name="galleryHasMedia_id",referencedColumnName="id")} |
||
51 | * ) |
||
52 | */ |
||
53 | protected $galleryHasMedia; |
||
54 | |||
55 | /** |
||
56 | * @var ArrayCollection|Tag[] |
||
57 | * |
||
58 | * @ORM\ManyToMany(targetEntity="AppBundle\Entity\Tag", inversedBy="posts", cascade={"persist"}) |
||
59 | * @Serializer\Expose |
||
60 | */ |
||
61 | protected $tags; |
||
62 | |||
63 | /** |
||
64 | * @var bool |
||
65 | * |
||
66 | * @ORM\Column(name="pinned", type="boolean") |
||
67 | * @Serializer\Type("boolean") |
||
68 | * @Serializer\Expose |
||
69 | */ |
||
70 | protected $pinned = false; |
||
71 | |||
72 | 1 | /** |
|
73 | * Constructor |
||
74 | 1 | */ |
|
75 | 1 | public function __construct() |
|
81 | |||
82 | /** |
||
83 | * Get id |
||
84 | 2 | * |
|
85 | * @return integer |
||
86 | 2 | */ |
|
87 | public function getId() |
||
91 | |||
92 | /** |
||
93 | * Unset translations |
||
94 | 4 | * |
|
95 | * @return Post |
||
96 | 4 | */ |
|
97 | public function unsetTranslations() |
||
103 | |||
104 | /** |
||
105 | * Add galleryHasMedia |
||
106 | * |
||
107 | * @param \Application\Sonata\MediaBundle\Entity\GalleryHasMedia $galleryHasMedia |
||
108 | * @return self |
||
109 | */ |
||
110 | public function addGalleryHasMedia(\Application\Sonata\MediaBundle\Entity\GalleryHasMedia $galleryHasMedia) |
||
116 | |||
117 | /** |
||
118 | * Remove galleryHasMedia |
||
119 | * |
||
120 | * @param \Application\Sonata\MediaBundle\Entity\GalleryHasMedia $galleryHasMedia |
||
121 | */ |
||
122 | public function removeGalleryHasMedia(\Application\Sonata\MediaBundle\Entity\GalleryHasMedia $galleryHasMedia) |
||
126 | |||
127 | /** |
||
128 | * Get galleryHasMedia |
||
129 | 6 | * |
|
130 | * @return \Doctrine\Common\Collections\Collection |
||
131 | 6 | */ |
|
132 | public function getGalleryHasMedia() |
||
136 | |||
137 | /** |
||
138 | * Add tags |
||
139 | * |
||
140 | * @param \AppBundle\Entity\Tag $tags |
||
141 | * @return self |
||
142 | */ |
||
143 | public function addTag(\AppBundle\Entity\Tag $tags) |
||
149 | |||
150 | /** |
||
151 | * Remove tags |
||
152 | * |
||
153 | * @param \AppBundle\Entity\Tag $tags |
||
154 | */ |
||
155 | public function removeTag(\AppBundle\Entity\Tag $tags) |
||
159 | |||
160 | /** |
||
161 | * Get tags |
||
162 | 5 | * |
|
163 | * @return \Doctrine\Common\Collections\Collection |
||
164 | 5 | */ |
|
165 | public function getTags() |
||
169 | |||
170 | /** |
||
171 | 1 | * @param boolean $pinned |
|
172 | * @return Post |
||
173 | 1 | */ |
|
174 | public function setPinned($pinned) |
||
180 | |||
181 | 1 | /** |
|
182 | * @return boolean |
||
183 | 1 | */ |
|
184 | public function isPinned() |
||
188 | } |
||
189 |