|
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 CreateSessionWithUsersAndCoursesInput |
|
18
|
|
|
{ |
|
19
|
|
|
#[Assert\NotBlank] |
|
20
|
|
|
#[Groups(['write'])] |
|
21
|
|
|
private string $title; |
|
22
|
|
|
|
|
23
|
|
|
#[Groups(['write'])] |
|
24
|
|
|
private ?string $description = null; |
|
25
|
|
|
|
|
26
|
|
|
#[Groups(['write'])] |
|
27
|
|
|
private ?int $visibility = 1; |
|
28
|
|
|
|
|
29
|
|
|
#[Groups(['write'])] |
|
30
|
|
|
private array $courseIds = []; |
|
31
|
|
|
|
|
32
|
|
|
#[Groups(['write'])] |
|
33
|
|
|
private array $studentIds = []; |
|
34
|
|
|
|
|
35
|
|
|
#[Groups(['write'])] |
|
36
|
|
|
private array $tutorIds = []; |
|
37
|
|
|
|
|
38
|
|
|
public function getTitle(): string { return $this->title; } |
|
39
|
|
|
public function setTitle(string $title): void { $this->title = $title; } |
|
40
|
|
|
|
|
41
|
|
|
public function getDescription(): ?string { return $this->description; } |
|
42
|
|
|
public function setDescription(?string $description): void { $this->description = $description; } |
|
43
|
|
|
|
|
44
|
|
|
public function getVisibility(): ?int { return $this->visibility; } |
|
45
|
|
|
public function setVisibility(?int $visibility): void { $this->visibility = $visibility; } |
|
46
|
|
|
|
|
47
|
|
|
public function getCourseIds(): array { return $this->courseIds; } |
|
48
|
|
|
public function setCourseIds(array $courseIds): void { $this->courseIds = $courseIds; } |
|
49
|
|
|
|
|
50
|
|
|
public function getStudentIds(): array { return $this->studentIds; } |
|
51
|
|
|
public function setStudentIds(array $studentIds): void { $this->studentIds = $studentIds; } |
|
52
|
|
|
|
|
53
|
|
|
public function getTutorIds(): array { return $this->tutorIds; } |
|
54
|
|
|
public function setTutorIds(array $tutorIds): void { $this->tutorIds = $tutorIds; } |
|
55
|
|
|
} |
|
56
|
|
|
|