1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* For licensing terms, see /license.txt */ |
4
|
|
|
|
5
|
|
|
declare(strict_types=1); |
6
|
|
|
|
7
|
|
|
namespace Chamilo\CoreBundle\Dto; |
8
|
|
|
|
9
|
|
|
use ApiPlatform\Metadata\ApiResource; |
10
|
|
|
use Symfony\Component\Serializer\Annotation\Groups; |
11
|
|
|
use Symfony\Component\Validator\Constraints as Assert; |
12
|
|
|
|
13
|
|
|
#[ApiResource( |
14
|
|
|
normalizationContext: ['groups' => ['read']], |
15
|
|
|
denormalizationContext: ['groups' => ['write']], |
16
|
|
|
)] |
17
|
|
|
class CreateUserOnAccessUrlInput |
18
|
|
|
{ |
19
|
|
|
#[Assert\NotBlank] |
20
|
|
|
#[Groups(['write'])] |
21
|
|
|
private string $username; |
22
|
|
|
|
23
|
|
|
#[Assert\NotBlank] |
24
|
|
|
#[Assert\Email] |
25
|
|
|
#[Groups(['write'])] |
26
|
|
|
private string $email; |
27
|
|
|
|
28
|
|
|
#[Groups(['write'])] |
29
|
|
|
private ?string $firstname = null; |
30
|
|
|
|
31
|
|
|
#[Groups(['write'])] |
32
|
|
|
private ?string $lastname = null; |
33
|
|
|
|
34
|
|
|
#[Groups(['write'])] |
35
|
|
|
private ?string $password = null; |
36
|
|
|
|
37
|
|
|
#[Groups(['write'])] |
38
|
|
|
private ?string $locale = null; |
39
|
|
|
|
40
|
|
|
#[Groups(['write'])] |
41
|
|
|
private ?string $timezone = null; |
42
|
|
|
|
43
|
|
|
#[Groups(['write'])] |
44
|
|
|
private ?int $status = null; |
45
|
|
|
|
46
|
|
|
#[Groups(['write'])] |
47
|
|
|
public ?array $extraFields = null; |
48
|
|
|
|
49
|
|
|
#[Groups(['write'])] |
50
|
|
|
private bool $sendEmail = true; |
51
|
|
|
|
52
|
|
|
public function getUsername(): string |
53
|
|
|
{ |
54
|
|
|
return $this->username; |
55
|
|
|
} |
56
|
|
|
public function setUsername(string $username): void |
57
|
|
|
{ |
58
|
|
|
$this->username = $username; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
public function getEmail(): string |
62
|
|
|
{ |
63
|
|
|
return $this->email; |
64
|
|
|
} |
65
|
|
|
public function setEmail(string $email): void |
66
|
|
|
{ |
67
|
|
|
$this->email = $email; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
public function getFirstname(): ?string |
71
|
|
|
{ |
72
|
|
|
return $this->firstname; |
73
|
|
|
} |
74
|
|
|
public function setFirstname(?string $firstname): void |
75
|
|
|
{ |
76
|
|
|
$this->firstname = $firstname; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
public function getLastname(): ?string |
80
|
|
|
{ |
81
|
|
|
return $this->lastname; |
82
|
|
|
} |
83
|
|
|
public function setLastname(?string $lastname): void |
84
|
|
|
{ |
85
|
|
|
$this->lastname = $lastname; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
public function getPassword(): ?string |
89
|
|
|
{ |
90
|
|
|
return $this->password; |
91
|
|
|
} |
92
|
|
|
public function setPassword(?string $password): void |
93
|
|
|
{ |
94
|
|
|
$this->password = $password; |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
public function getLocale(): ?string |
98
|
|
|
{ |
99
|
|
|
return $this->locale; |
100
|
|
|
} |
101
|
|
|
public function setLocale(?string $locale): void |
102
|
|
|
{ |
103
|
|
|
$this->locale = $locale; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
public function getTimezone(): ?string |
107
|
|
|
{ |
108
|
|
|
return $this->timezone; |
109
|
|
|
} |
110
|
|
|
public function setTimezone(?string $timezone): void |
111
|
|
|
{ |
112
|
|
|
$this->timezone = $timezone; |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
public function getStatus(): ?int |
116
|
|
|
{ |
117
|
|
|
return $this->status; |
118
|
|
|
} |
119
|
|
|
public function setStatus(?int $status): void |
120
|
|
|
{ |
121
|
|
|
$this->status = $status; |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
public function getSendEmail(): ?bool |
125
|
|
|
{ |
126
|
|
|
return $this->sendEmail; |
127
|
|
|
} |
128
|
|
|
|
129
|
|
|
public function setSendEmail(bool $sendEmail): void |
130
|
|
|
{ |
131
|
|
|
$this->sendEmail = $sendEmail; |
132
|
|
|
} |
133
|
|
|
} |
134
|
|
|
|