-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathMagazineLogEntryPurged.php
More file actions
44 lines (35 loc) · 972 Bytes
/
MagazineLogEntryPurged.php
File metadata and controls
44 lines (35 loc) · 972 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
declare(strict_types=1);
namespace App\Entity;
use App\Entity\Contracts\ContentInterface;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\ManyToOne;
#[Entity]
class MagazineLogEntryPurged extends MagazineLog
{
#[Column(type: 'string', length: Entry::MAX_TITLE_LENGTH)]
public string $title;
#[JoinColumn(onDelete: 'CASCADE')]
#[ManyToOne(targetEntity: User::class)]
public User $author;
public function __construct(Magazine $magazine, User $user, string $title, User $author)
{
parent::__construct($magazine, $user);
$this->title = $title;
$this->author = $author;
}
public function getSubject(): ?ContentInterface
{
return null;
}
public function clearSubject(): MagazineLog
{
return $this;
}
public function getType(): string
{
return 'log_entry_purged';
}
}