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

PageState

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

data: *

public

type: *

Method Summary

Public Methods
public

get(key: *): *

public

matches(type: object, data: object): boolean

Determine whether the page matches the given class and data.

public

set(key: *, value: *)

Public Constructors

public constructor() source

Public Members

public data: * source

public type: * source

Public Methods

public get(key: *): * source

Params:

NameTypeAttributeDescription
key *

Return:

*

public matches(type: object, data: object): boolean source

Determine whether the page matches the given class and data.

Params:

NameTypeAttributeDescription
type object

The page class to check against. Subclasses are accepted as well.

data object

Return:

boolean

public set(key: *, value: *) source

Params:

NameTypeAttributeDescription
key *
value *