Firesphere\SolrSearch\Tests\MockState
Synopsis
class MockState
extends SiteState
implements
TestOnly,SiteStateInterface
{
- // members
- public boolean $enabled = false;
- // methods
- public void appliesToEnvironment()
- public mixed setDefaultState()
- public mixed activateState()
- public string currentState()
- public bool stateIsApplicable()
- public mixed updateQuery()
Hierarchy
Extends
- Firesphere\SolrSearch\States\SiteState
Implements
- SilverStripe\Dev\TestOnly
- Firesphere\SolrSearch\Interfaces\SiteStateInterface
Tasks
Line | Task |
---|---|
71 | Implement updateQuery() method. |
Members
public
- $enabled
Methods
public
- activateState() — Activate a given state. This should only be done if the state is applicable
- appliesToEnvironment()
- currentState() — Return the current state of the site
- setDefaultState() — Reset the SiteState to it's default state
- stateIsApplicable() — Is this state applicable to this extension E.g. in case of Fluent, the state "SubsiteID1" does not make sense
- updateQuery() — Method to alter the query. Can be no-op.