1 | <?php declare(strict_types = 1); |
||
30 | class UserPictures implements Proxy |
||
31 | { |
||
32 | /** |
||
33 | * @var string Cover url |
||
34 | * @ORM\Column(type="string", length=255) |
||
35 | * @JMS\Expose() |
||
36 | * @JMS\SerializedName("cover") |
||
37 | * @Bukashk0zzz\LiipImagineSerializableField(filter={"big", "small"}) |
||
38 | */ |
||
39 | public $coverUrl; |
||
40 | |||
41 | /** |
||
42 | * @var string Image url |
||
43 | * @ORM\Column(type="string", length=255) |
||
44 | * @JMS\Expose() |
||
45 | * @JMS\SerializedName("image") |
||
46 | * @Bukashk0zzz\LiipImagineSerializableField(filter="thumb_filter", virtualField="image_thumb") |
||
47 | */ |
||
48 | public $imageUrl; |
||
49 | |||
50 | /** |
||
51 | * @var string Photo name |
||
52 | * @ORM\Column(type="string", length=255) |
||
53 | * @JMS\Expose() |
||
54 | * @JMS\SerializedName("photo") |
||
55 | * @Bukashk0zzz\LiipImagineSerializableField(filter="thumb_filter", vichUploaderField="photoFile", virtualField="photoThumb") |
||
56 | */ |
||
57 | public $photoName; |
||
58 | |||
59 | /** |
||
60 | * @var File Photo file |
||
61 | * @JMS\Exclude() |
||
62 | * @Vich\UploadableField(mapping="user_photo_mapping", fileNameProperty="photoName") |
||
63 | */ |
||
64 | public $photoFile; |
||
65 | |||
66 | /** |
||
67 | * @var User |
||
68 | * @ORM\ManyToOne(targetEntity="Bukashk0zzz\LiipImagineSerializationBundle\Tests\Fixtures\User", inversedBy="pictures") |
||
69 | * @ORM\JoinColumn(name="user_id", referencedColumnName="id") |
||
70 | */ |
||
71 | protected $user; |
||
72 | |||
73 | /** |
||
74 | * @var int |
||
75 | * @ORM\Column(type="integer") |
||
76 | */ |
||
77 | protected $userId; |
||
78 | |||
79 | /** @var bool */ |
||
80 | private $status = false; |
||
81 | |||
82 | // @codingStandardsIgnoreStart |
||
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | public function __load() |
||
93 | |||
94 | /** |
||
95 | * {@inheritdoc} |
||
96 | * |
||
97 | * @return bool |
||
98 | */ |
||
99 | public function __isInitialized() |
||
103 | |||
104 | // @codingStandardsIgnoreEnd |
||
105 | |||
106 | /** |
||
107 | * To string |
||
108 | */ |
||
109 | public function __toString(): string |
||
113 | |||
114 | /** |
||
115 | * Set userId |
||
116 | */ |
||
117 | public function setUserId(int $userId): UserPictures |
||
123 | |||
124 | /** |
||
125 | * Get userId |
||
126 | */ |
||
127 | public function getUserId(): int |
||
131 | |||
132 | /** |
||
133 | * Set user |
||
134 | * |
||
135 | * @param User $user |
||
136 | */ |
||
137 | public function setUser(?User $user = null): UserPictures |
||
143 | |||
144 | /** |
||
145 | * Get user |
||
146 | */ |
||
147 | public function getUser(): User |
||
151 | |||
152 | public function getCoverUrl(): string |
||
156 | |||
157 | public function setCoverUrl(string $coverUrl): UserPictures |
||
163 | |||
164 | public function getImageUrl(): string |
||
168 | |||
169 | public function setImageUrl(string $imageUrl): UserPictures |
||
175 | |||
176 | /** |
||
177 | * @return mixed |
||
178 | */ |
||
179 | public function getPhotoName() |
||
183 | |||
184 | /** |
||
185 | * @param mixed $photoName |
||
186 | */ |
||
187 | public function setPhotoName($photoName): UserPictures |
||
193 | |||
194 | public function getPhotoFile(): File |
||
198 | |||
199 | public function setPhotoFile(File $photoFile): UserPictures |
||
205 | } |
||
206 |