Reference Source
import Post from 'flarum/compone/Post'
public class | source

Post

Extends:

src/common/Component.js~Component → Post

Direct Subclass:

CommentPost, EventPost

Indirect Subclass:

DiscussionRenamedPost

The Post component displays a single post. The basic post template just includes a controls dropdown; subclasses must implement content and attrs methods.

Props

  • post

Member Summary

Public Members
public
public

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

Method Summary

Public Methods
public

Build an item list for the post's actions.

public

Get attributes for the post element.

public

classes(string: *): string[]

Get the post's classes.

public

config(isInitialized: *)

public

Get the post's content.

public

Build an item list for the post's footer.

public

init()

public

view(): *

Public Members

public loading: boolean source

public subtree: SubtreeRetainer source

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

Public Methods

public actionItems(): ItemList source

Build an item list for the post's actions.

Return:

ItemList

public attrs(): Object source

Get attributes for the post element.

Return:

Object

public classes(string: *): string[] source

Get the post's classes.

Params:

NameTypeAttributeDescription
string *

classes

Return:

string[]

public config(isInitialized: *) source

Params:

NameTypeAttributeDescription
isInitialized *

public content(): Array source

Get the post's content.

Return:

Array

public footerItems(): ItemList source

Build an item list for the post's footer.

Return:

ItemList

public init() source

public view(): * source

Return:

*