1 | <?php declare(strict_types = 1); |
||
31 | class User |
||
32 | { |
||
33 | /** |
||
34 | * @var string Cover url |
||
35 | * |
||
36 | * @ORM\Column(type="string", length=255) |
||
37 | * |
||
38 | * @JMS\Expose() |
||
39 | * @JMS\SerializedName("cover") |
||
40 | * |
||
41 | * @Bukashk0zzz\LiipImagineSerializableField("thumb_filter") |
||
42 | */ |
||
43 | public $coverUrl; |
||
44 | |||
45 | /** |
||
46 | * @var string Image url |
||
47 | * |
||
48 | * @ORM\Column(type="string", length=255) |
||
49 | * |
||
50 | * @JMS\Expose() |
||
51 | * @JMS\SerializedName("image") |
||
52 | * |
||
53 | * @Bukashk0zzz\LiipImagineSerializableField(filter="thumb_filter", virtualField="imageThumb") |
||
54 | */ |
||
55 | public $imageUrl; |
||
56 | |||
57 | /** |
||
58 | * @var string Photo name |
||
59 | * |
||
60 | * @ORM\Column(type="string", length=255) |
||
61 | * |
||
62 | * @JMS\Expose() |
||
63 | * @JMS\SerializedName("photo") |
||
64 | * |
||
65 | * @Bukashk0zzz\LiipImagineSerializableField(filter="thumb_filter", vichUploaderField="photoFile") |
||
66 | */ |
||
67 | public $photoName; |
||
68 | |||
69 | /** |
||
70 | * @var File Photo file |
||
71 | * |
||
72 | * @JMS\Exclude() |
||
73 | * |
||
74 | * @Vich\UploadableField(mapping="user_photo_mapping", fileNameProperty="photoName") |
||
75 | */ |
||
76 | public $photoFile; |
||
77 | |||
78 | /** |
||
79 | * @var UserPictures |
||
80 | * |
||
81 | * @ORM\OneToMany(targetEntity="Bukashk0zzz\LiipImagineSerializationBundle\Tests\Fixtures\UserPictures", mappedBy="user") |
||
82 | */ |
||
83 | public $userPictures; |
||
84 | |||
85 | /** |
||
86 | * @var UserPhotos |
||
87 | * |
||
88 | * @ORM\OneToMany(targetEntity="Bukashk0zzz\LiipImagineSerializationBundle\Tests\Fixtures\UserPhotos", mappedBy="user") |
||
89 | */ |
||
90 | public $userPhotos; |
||
91 | |||
92 | /** |
||
93 | * User constructor. |
||
94 | * |
||
95 | * @param null $photoName |
||
96 | */ |
||
97 | public function __construct($photoName = null) |
||
107 | |||
108 | /** |
||
109 | * To string |
||
110 | */ |
||
111 | public function __toString(): string |
||
115 | |||
116 | /** |
||
117 | * Get photo name |
||
118 | * |
||
119 | * @return string Photo name |
||
120 | */ |
||
121 | public function getPhotoName(): string |
||
125 | |||
126 | /** |
||
127 | * Set photo name |
||
128 | * |
||
129 | * @param string $photoName Photo name |
||
130 | */ |
||
131 | public function setPhotoName(string $photoName): User |
||
137 | |||
138 | /** |
||
139 | * Get photo file |
||
140 | * |
||
141 | * @return File Photo file |
||
142 | */ |
||
143 | public function getPhotoFile(): File |
||
147 | |||
148 | /** |
||
149 | * Set photo file |
||
150 | * |
||
151 | * @param File $photoFile Photo file |
||
152 | */ |
||
153 | public function setPhotoFile(File $photoFile): User |
||
159 | |||
160 | /** |
||
161 | * Add userPictures |
||
162 | */ |
||
163 | public function addUserPictures(UserPictures $userPictures): User |
||
169 | |||
170 | /** |
||
171 | * Get userPictures |
||
172 | */ |
||
173 | public function getUserPictures(): Collection |
||
177 | |||
178 | /** |
||
179 | * Add userPhotos |
||
180 | */ |
||
181 | public function addUserPhotos(UserPhotos $userPhotos): User |
||
187 | |||
188 | /** |
||
189 | * Get userPhotos |
||
190 | */ |
||
191 | public function getUserPhotos(): Collection |
||
195 | |||
196 | public function getCoverUrl(): string |
||
200 | |||
201 | public function setCoverUrl(string $coverUrl): User |
||
207 | |||
208 | public function getImageUrl(): string |
||
212 | |||
213 | public function setImageUrl(string $imageUrl): User |
||
219 | } |
||
220 |