Reference Source
import EventPost from 'flarum/forum/components/EventPost'
public class | source

EventPost

Extends:

src/common/Component.js~ComponentPost → EventPost

Direct Subclass:

DiscussionRenamedPost

The EventPost component displays a post which indicating a discussion event, like a discussion being renamed or stickied. Subclasses must implement the icon and description methods.

Attrs

  • All of the attrs for Post

Method Summary

Public Methods
public

content(): *

public

Get the description text for the event.

public

Get the translation data for the description of the event.

public

Get the translation key for the description of the event.

public
public

Get the name of the event icon.

Inherited Summary

From class Post
public
public

Set up a subtree retainer so that the post will not be redrawn unless new data comes in.

public

Build an item list for the post's actions.

public

classes(string: *): string[]

Get the post's classes.

public

Get the post's content.

public

Get attributes for the post element.

public

Build an item list for the post's footer.

public

onbeforeupdate(vnode: *): *

public

oninit(vnode: *)

public

onupdate(vnode: *)

public

view(): *

Public Methods

public content(): * source

Get the post's content.

Override:

Post#content

Return:

*

public description(data: Object): String | Object source

Get the description text for the event.

Params:

NameTypeAttributeDescription
data Object

Return:

String | Object

The description to render in the DOM

public descriptionData(): Object source

Get the translation data for the description of the event.

Return:

Object

public descriptionKey(): String source

Get the translation key for the description of the event.

Return:

String

public elementAttrs(): * source

Get attributes for the post element.

Override:

Post#elementAttrs

Return:

*

public icon(): String source

Get the name of the event icon.

Return:

String