SilverStripe Search

SiteStateInterface

Interface SiteStateInterface defines the methods every State altering must implement.

These methods must exist in the SiteStates that are available

Table of Contents

Methods

activateState()  : mixed
Activate a given state. This should only be done if the state is applicable
currentState()  : string|int|null
Return the current state of the site
setDefaultState()  : mixed
Reset the SiteState to it's default state
stateIsApplicable()  : bool
Is this state applicable to this extension E.g. in case of Fluent, the state "SubsiteID1" does not make sense
updateQuery()  : mixed
Method to alter the query. Can be no-op.

Methods

activateState()

Activate a given state. This should only be done if the state is applicable

public activateState(string|int $state) : mixed
Parameters
$state : string|int

currentState()

Return the current state of the site

public currentState() : string|int|null
Return values
string|int|null

setDefaultState()

Reset the SiteState to it's default state

public setDefaultState([string|int|null $state = null ]) : mixed
Parameters
$state : string|int|null = null

stateIsApplicable()

Is this state applicable to this extension E.g. in case of Fluent, the state "SubsiteID1" does not make sense

public stateIsApplicable(string|int $state) : bool
Parameters
$state : string|int
Return values
bool

        
On this page

Search results