Reference Source
import Post from 'flarum/components/Post.js'
public class | source

Post

Extends:

flarum/Component~Component → Post

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

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

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 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 config(isInitialized: *) source

Params:

NameTypeAttributeDescription
isInitialized *

public content(): Object source

Get the post's content.

Return:

Object

public footerItems(): ItemList source

Build an item list for the post's footer.

Return:

ItemList

public init() source

public view(): * source

Return:

*