Newer
Older
namespace Dbp\Relay\BaseCourseBundle\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use Dbp\Relay\BaseCourseBundle\Controller\GetAttendeesByCourse;
use Symfony\Component\Serializer\Annotation\Groups;
/**
Tobias Gross-Vogt
committed
* Currently disabled:
* ApiResource(
* "security" = "is_granted('IS_AUTHENTICATED_FULLY')",
* }
* },
* "get_bycourse" = {
* "method" = "GET",
* "path" = "/base/courses/{identifier}/attendees",
* "security" = "is_granted('IS_AUTHENTICATED_FULLY')",
* "controller" = GetAttendeesByCourse::class,
* "read" = false,
* "normalization_context" = {
* "jsonld_embed_context" = true,
* "summary" = "Get the attendees of a course.",
* "parameters" = {
Tobias Gross-Vogt
committed
* {"name" = "identifier", "in" = "path", "description" = "Resource identifier", "required" = true, "type" = "string", "example" = "257571"},
* {"name" = "lang", "in" = "query", "description" = "Language of result", "type" = "string", "enum" = {"de", "en"}, "example" = "de"},
* {"name" = "partialPagination", "in" = "query", "description" = "Enable partial pagination", "type" = "bool", "example" = "false"}
* }
* }
* }
* },
* itemOperations={
* "get" = {
* "path" = "/course_attendees/{identifier}",
* "security" = "is_granted('IS_AUTHENTICATED_FULLY')",
* }
* }
* },
* iri="http://schema.org/Person",
* shortName="CourseAttendee",
* description="A person attending a course",
Tobias Gross-Vogt
committed
* ).
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/**
* @ApiProperty(identifier=true)
* @Groups({"CourseAttendee:output"})
*
* @var string
*/
private $identifier;
/**
* @ApiProperty(iri="http://schema.org/givenName")
* @Groups({"CourseAttendee:output"})
*
* @var string
*/
private $givenName;
/**
* @var string
* @ApiProperty(iri="http://schema.org/familyName")
* @Groups({"CourseAttendee:output"})
*
* @var string
*/
private $familyName;
/**
* @ApiProperty(iri="http://schema.org/email")
* @Groups({"CourseAttendee:output"})
*
* @var string
*/
private $email;
public function setIdentifier(string $identifier): void
{
$this->identifier = $identifier;
}
public function getIdentifier(): ?string
{
return $this->identifier;
}
public function getGivenName(): ?string
{
return $this->givenName;
}
public function setGivenName(string $givenName): void
{
$this->givenName = $givenName;
}
public function getFamilyName(): ?string
{
return $this->familyName;
}
public function setFamilyName(string $familyName): void
{
$this->familyName = $familyName;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): void
{
$this->email = $email;
}