mirror of
https://github.com/flarum/framework.git
synced 2025-02-06 06:56:14 +08:00
Add new method to DiscussionRenamedBlueprint
This commit is contained in:
parent
cf3e0cc5bc
commit
119662f6ce
|
@ -51,6 +51,19 @@ class DiscussionRenamedBlueprint implements BlueprintInterface
|
|||
return ['postNumber' => (int) $this->post->number];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getAttributes(): array
|
||||
{
|
||||
return [
|
||||
'type' => static::getType(),
|
||||
'from_user_id' => $this->post->user ? $this->post->user->id : null,
|
||||
'subject_id' => $this->post->discussion ? $this->post->discussion->id : null,
|
||||
'data' => json_encode(['postNumber' => (int) $this->post->number]),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user