Add new method to DiscussionRenamedBlueprint

This commit is contained in:
Franz Liedke 2020-03-27 15:53:24 +01:00
parent cf3e0cc5bc
commit 119662f6ce

View File

@ -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}
*/