1 | <?php |
||
17 | abstract class AbstractTranslateableStory extends AbstractPersonalTranslatable implements TranslatableInterface |
||
18 | { |
||
19 | use TimestampableTrait, BlameableEntity; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | * |
||
24 | * @Gedmo\Translatable |
||
25 | * @Assert\NotBlank() |
||
26 | * @ORM\Column(type="string", length=255) |
||
27 | * @Serializer\Type("string") |
||
28 | * @Serializer\Expose |
||
29 | */ |
||
30 | protected $title; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | * |
||
35 | * @Gedmo\Translatable |
||
36 | * @ORM\Column(type="text", nullable=true) |
||
37 | * @Serializer\Type("string") |
||
38 | * @Serializer\Expose |
||
39 | */ |
||
40 | protected $shortDescription; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | * |
||
45 | * @Gedmo\Translatable |
||
46 | * @ORM\Column(type="text", nullable=true) |
||
47 | * @Serializer\Type("string") |
||
48 | * @Serializer\Expose |
||
49 | */ |
||
50 | protected $text; |
||
51 | |||
52 | /** |
||
53 | * @var \App\Entity\Media |
||
54 | * |
||
55 | * @ORM\OneToOne(targetEntity="App\Entity\Media", cascade={"persist"}) |
||
56 | * @ORM\JoinColumn(name="mainPicture_id", referencedColumnName="id") |
||
57 | */ |
||
58 | protected $mainPicture; |
||
59 | |||
60 | /** |
||
61 | * @var array |
||
62 | * |
||
63 | * @Serializer\Expose |
||
64 | * @Serializer\Type("array") |
||
65 | * @Serializer\SerializedName("mainPicture") |
||
66 | */ |
||
67 | public $mainPictureThumbnails; |
||
68 | |||
69 | /** |
||
70 | * @var array |
||
71 | * |
||
72 | * @Serializer\Expose |
||
73 | * @Serializer\Type("array") |
||
74 | * @Serializer\SerializedName("gallery") |
||
75 | */ |
||
76 | public $galleryHasMediaThumbnails; |
||
77 | |||
78 | /** |
||
79 | * @var string |
||
80 | * |
||
81 | * @Gedmo\Slug(fields={"title"}) |
||
82 | * @ORM\Column(name="slug", type="string", length=255) |
||
83 | * @Serializer\Type("string") |
||
84 | * @Serializer\Expose |
||
85 | */ |
||
86 | protected $slug; |
||
87 | |||
88 | /** |
||
89 | * Set title |
||
90 | * |
||
91 | * @param string $title |
||
92 | * @return $this |
||
93 | */ |
||
94 | 1 | public function setTitle($title) |
|
95 | { |
||
96 | 1 | $this->title = $title; |
|
97 | |||
98 | 1 | return $this; |
|
99 | } |
||
100 | |||
101 | /** |
||
102 | * Get title |
||
103 | * |
||
104 | * @return string |
||
105 | */ |
||
106 | 9 | public function getTitle() |
|
110 | |||
111 | /** |
||
112 | * Set shortDescription |
||
113 | * |
||
114 | * @param string $shortDescription |
||
115 | * @return self |
||
116 | */ |
||
117 | public function setShortDescription($shortDescription) |
||
123 | |||
124 | /** |
||
125 | * Get shortDescription |
||
126 | * |
||
127 | * @return string |
||
128 | */ |
||
129 | 1 | public function getShortDescription() |
|
133 | |||
134 | /** |
||
135 | * Set text |
||
136 | * |
||
137 | * @param string $text |
||
138 | * @return self |
||
139 | */ |
||
140 | 1 | public function setText($text) |
|
141 | { |
||
142 | 1 | $this->text = $text; |
|
143 | |||
144 | 1 | return $this; |
|
145 | } |
||
146 | |||
147 | /** |
||
148 | * Get text |
||
149 | * |
||
150 | * @return string |
||
151 | */ |
||
152 | 2 | public function getText() |
|
156 | |||
157 | /** |
||
158 | * Set slug |
||
159 | * |
||
160 | * @param string $slug |
||
161 | * @return self |
||
162 | */ |
||
163 | public function setSlug($slug) |
||
169 | |||
170 | /** |
||
171 | * Get slug |
||
172 | * |
||
173 | * @return string |
||
174 | */ |
||
175 | 2 | public function getSlug() |
|
179 | |||
180 | /** |
||
181 | * Set mainPicture |
||
182 | * |
||
183 | * @param \App\Entity\Media $mainPicture |
||
184 | * @return self |
||
185 | */ |
||
186 | public function setMainPicture(\App\Entity\Media $mainPicture = null) |
||
192 | |||
193 | /** |
||
194 | * Get mainPicture |
||
195 | * |
||
196 | * @return \App\Entity\Media |
||
197 | */ |
||
198 | 12 | public function getMainPicture() |
|
202 | |||
203 | /** |
||
204 | * @return string |
||
205 | */ |
||
206 | 5 | public function __toString() |
|
210 | } |
||
211 |