Reference Source
import DiscussionListState from 'flarum/states/DiscussionListState'
public class | source

DiscussionListState

Extends:

src/common/states/PaginatedListState.js~PaginatedListState → DiscussionListState

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public get

Method Summary

Public Methods
public

addDiscussion(discussion: Discussion)

Add a discussion to the top of the list.

public

clear()

public
public
public

In the last request, has the user searched for a discussion?

public
public
public
public

sortMap(): *

Get a map of sort keys (which appear in the URL, and are used for translation) to the API sort value that they represent.

Public Constructors

public constructor() source

Public Members

public extraDiscussions: undefined source

public initialLoading: boolean source

public get type: string source

Public Methods

public addDiscussion(discussion: Discussion) source

Add a discussion to the top of the list.

Params:

NameTypeAttributeDescription
discussion Discussion

public clear() source

public getAllItems(): undefined source

Return:

undefined

public getPages(): undefined source

Return:

undefined

public isSearchResults(): * source

In the last request, has the user searched for a discussion?

Return:

*

public loadPage(page: number): undefined source

Params:

NameTypeAttributeDescription
page number

Return:

undefined

public removeDiscussion(discussion: Discussion) source

Params:

NameTypeAttributeDescription
discussion Discussion

public requestParams(): * source

Return:

*

public sortMap(): * source

Get a map of sort keys (which appear in the URL, and are used for translation) to the API sort value that they represent.

Return:

*