|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* For licensing terms, see /license.txt */ |
|
4
|
|
|
|
|
5
|
|
|
declare(strict_types=1); |
|
6
|
|
|
|
|
7
|
|
|
namespace Chamilo\CoreBundle\Entity; |
|
8
|
|
|
|
|
9
|
|
|
use Chamilo\CoreBundle\Repository\XApiAttachmentRepository; |
|
10
|
|
|
use Doctrine\DBAL\Types\Types; |
|
11
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
12
|
|
|
|
|
13
|
|
|
#[ORM\Entity(repositoryClass: XApiAttachmentRepository::class)] |
|
14
|
|
|
class XApiAttachment |
|
15
|
|
|
{ |
|
16
|
|
|
#[ORM\Id] |
|
17
|
|
|
#[ORM\GeneratedValue] |
|
18
|
|
|
#[ORM\Column] |
|
19
|
|
|
private ?int $identifier = null; |
|
20
|
|
|
|
|
21
|
|
|
#[ORM\Column(length: 255)] |
|
22
|
|
|
private ?string $usageType = null; |
|
23
|
|
|
|
|
24
|
|
|
#[ORM\Column] |
|
25
|
|
|
private ?int $contentType = null; |
|
26
|
|
|
|
|
27
|
|
|
#[ORM\Column] |
|
28
|
|
|
private ?int $length = null; |
|
29
|
|
|
|
|
30
|
|
|
#[ORM\Column(length: 255)] |
|
31
|
|
|
private ?string $sha2 = null; |
|
32
|
|
|
|
|
33
|
|
|
#[ORM\Column] |
|
34
|
|
|
private array $display = []; |
|
35
|
|
|
|
|
36
|
|
|
#[ORM\Column] |
|
37
|
|
|
private ?bool $hasDescription = null; |
|
38
|
|
|
|
|
39
|
|
|
#[ORM\Column(nullable: true)] |
|
40
|
|
|
private ?array $description = null; |
|
41
|
|
|
|
|
42
|
|
|
#[ORM\Column(length: 255, nullable: true)] |
|
43
|
|
|
private ?string $fileUrl = null; |
|
44
|
|
|
|
|
45
|
|
|
#[ORM\Column(type: Types::TEXT, nullable: true)] |
|
46
|
|
|
private ?string $content = null; |
|
47
|
|
|
|
|
48
|
|
|
#[ORM\ManyToOne(inversedBy: 'attachments')] |
|
49
|
|
|
private ?XApiStatement $statement = null; |
|
50
|
|
|
|
|
51
|
|
|
public function getIdentifier(): ?int |
|
52
|
|
|
{ |
|
53
|
|
|
return $this->identifier; |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
public function getUsageType(): ?string |
|
57
|
|
|
{ |
|
58
|
|
|
return $this->usageType; |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
public function setUsageType(string $usageType): static |
|
62
|
|
|
{ |
|
63
|
|
|
$this->usageType = $usageType; |
|
64
|
|
|
|
|
65
|
|
|
return $this; |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
public function getLength(): ?int |
|
69
|
|
|
{ |
|
70
|
|
|
return $this->length; |
|
71
|
|
|
} |
|
72
|
|
|
|
|
73
|
|
|
public function setLength(int $length): static |
|
74
|
|
|
{ |
|
75
|
|
|
$this->length = $length; |
|
76
|
|
|
|
|
77
|
|
|
return $this; |
|
78
|
|
|
} |
|
79
|
|
|
|
|
80
|
|
|
public function getContentType(): ?int |
|
81
|
|
|
{ |
|
82
|
|
|
return $this->contentType; |
|
83
|
|
|
} |
|
84
|
|
|
|
|
85
|
|
|
public function setContentType(int $contentType): static |
|
86
|
|
|
{ |
|
87
|
|
|
$this->contentType = $contentType; |
|
88
|
|
|
|
|
89
|
|
|
return $this; |
|
90
|
|
|
} |
|
91
|
|
|
|
|
92
|
|
|
public function getSha2(): ?string |
|
93
|
|
|
{ |
|
94
|
|
|
return $this->sha2; |
|
95
|
|
|
} |
|
96
|
|
|
|
|
97
|
|
|
public function setSha2(string $sha2): static |
|
98
|
|
|
{ |
|
99
|
|
|
$this->sha2 = $sha2; |
|
100
|
|
|
|
|
101
|
|
|
return $this; |
|
102
|
|
|
} |
|
103
|
|
|
|
|
104
|
|
|
public function getDisplay(): array |
|
105
|
|
|
{ |
|
106
|
|
|
return $this->display; |
|
107
|
|
|
} |
|
108
|
|
|
|
|
109
|
|
|
public function setDisplay(array $display): static |
|
110
|
|
|
{ |
|
111
|
|
|
$this->display = $display; |
|
112
|
|
|
|
|
113
|
|
|
return $this; |
|
114
|
|
|
} |
|
115
|
|
|
|
|
116
|
|
|
public function hasDescription(): ?bool |
|
117
|
|
|
{ |
|
118
|
|
|
return $this->hasDescription; |
|
119
|
|
|
} |
|
120
|
|
|
|
|
121
|
|
|
public function setHasDescription(bool $hasDescription): static |
|
122
|
|
|
{ |
|
123
|
|
|
$this->hasDescription = $hasDescription; |
|
124
|
|
|
|
|
125
|
|
|
return $this; |
|
126
|
|
|
} |
|
127
|
|
|
|
|
128
|
|
|
public function getDescription(): ?array |
|
129
|
|
|
{ |
|
130
|
|
|
return $this->description; |
|
131
|
|
|
} |
|
132
|
|
|
|
|
133
|
|
|
public function setDescription(?array $description): static |
|
134
|
|
|
{ |
|
135
|
|
|
$this->description = $description; |
|
136
|
|
|
|
|
137
|
|
|
return $this; |
|
138
|
|
|
} |
|
139
|
|
|
|
|
140
|
|
|
public function getFileUrl(): ?string |
|
141
|
|
|
{ |
|
142
|
|
|
return $this->fileUrl; |
|
143
|
|
|
} |
|
144
|
|
|
|
|
145
|
|
|
public function setFileUrl(?string $fileUrl): static |
|
146
|
|
|
{ |
|
147
|
|
|
$this->fileUrl = $fileUrl; |
|
148
|
|
|
|
|
149
|
|
|
return $this; |
|
150
|
|
|
} |
|
151
|
|
|
|
|
152
|
|
|
public function getContent(): ?string |
|
153
|
|
|
{ |
|
154
|
|
|
return $this->content; |
|
155
|
|
|
} |
|
156
|
|
|
|
|
157
|
|
|
public function setContent(?string $content): static |
|
158
|
|
|
{ |
|
159
|
|
|
$this->content = $content; |
|
160
|
|
|
|
|
161
|
|
|
return $this; |
|
162
|
|
|
} |
|
163
|
|
|
|
|
164
|
|
|
public function getStatement(): ?XApiStatement |
|
165
|
|
|
{ |
|
166
|
|
|
return $this->statement; |
|
167
|
|
|
} |
|
168
|
|
|
|
|
169
|
|
|
public function setStatement(?XApiStatement $statement): static |
|
170
|
|
|
{ |
|
171
|
|
|
$this->statement = $statement; |
|
172
|
|
|
|
|
173
|
|
|
return $this; |
|
174
|
|
|
} |
|
175
|
|
|
} |
|
176
|
|
|
|