blob: 2ffe1b22d5c5fea09942e4b7edcffadb5e087fbb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?php
namespace Digitigrade\Timeline;
use Digitigrade\Model\Actor;
class ReasonReshared extends TimelineInclusionReason {
private Actor $resharer;
public function __construct(Actor $resharer) {
$this->resharer = $resharer;
}
public function renderAsHtml() {
render_template('reason_reshared', ['actor' => $this->resharer]);
}
public function toJsonReference(): mixed {
return $this->resharer->id;
}
public static function fromJsonReference(mixed $reference): self {
return new self(Actor::find($reference));
}
}
|