SilverStripe\FullTextSearch\Tests\SolrReindexTest\SolrReindexTest_Variant
Dummy variant that selects items with field Variant matching the current value
Variant states are 0 and 1, or null if disabled
Synopsis
class SolrReindexTest_Variant
extends SearchVariant
implements
TestOnly
{
- // members
- protected static int|null $current = NULL;
- // Inherited members from SearchVariant
- protected static $variants;
- protected static array $class_variants;
- protected static array $call_instances;
- // methods
- public static void enable()
- public static void disable()
- public void activateState()
- public static void set_current()
- public static string|null get_current()
- public void alterDefinition()
- public void alterQuery()
- public void appliesTo()
- public void appliesToEnvironment()
- public void currentState()
- public void reindexStates()
- // Inherited methods from SearchVariant
- public void __construct()
- public void appliesToEnvironment()
- public abstract void appliesTo()
- public abstract void currentState()
- public abstract void reindexStates()
- public abstract void activateState()
- public abstract void alterQuery()
- public static array variants()
- public static void clear_variant_cache()
- public static SearchVariant_Caller with()
- public static SearchVariant_Caller withCommon()
- public static void call()
- public static array current_state()
- public static void activate_state()
- public static SearchVariant_ReindexStateIteratorRet reindex_states()
- protected void addFilterField()
- protected array|string mergeClasses()
Hierarchy
Extends
Implements
- SilverStripe\Dev\TestOnly
Members
protected
-
$call_instances
Holds a cache of SearchVariant_Caller instances, one for each class/includeSubclasses setting -
$class_variants
Holds a cache of the variants keyed by "class!" "1"? (1 = include subclasses) - $current
—
SilverStripe\FullTextSearch\Tests\SolrReindexTest\int|null
Value of this variant (either null, 0, or 1) -
$variants
Holds a cache of all variants
Methods
public
- activateState()
- alterDefinition()
- alterQuery()
- appliesTo()
- appliesToEnvironment()
- currentState()
- disable() — Disable this variant and reset
- enable() — Activate this variant
- get_current() — Get the current state
- reindexStates()
- set_current() — Set the current variant to the given state
Inherited from SilverStripe\FullTextSearch\Search\Variants\SearchVariant
protected
- addFilterField() — Add new filter field to index safely.
- mergeClasses() — Merge sets of (or individual) class names together for a search index field.
public
- activateState() — Activate the passed state
- activate_state() — Activate all the states in the passed argument
- alterQuery() — Apply this variant to a search query
- appliesTo() — Return true if this variant applies to the passed class & subclass
- appliesToEnvironment() — Return false if there is something missing from the environment (probably a not installed module) that means this variant can't apply to any class
- call() — A shortcut to with when calling without passing in a class,
- clear_variant_cache() — Clear the cached variants
- currentState() — Return the current state
- current_state() — Get the current state of every variant
- reindexStates() — Return all states to step through to reindex all items
- reindex_states() — Return an iterator that, when used in a for loop, activates one combination of reindex states per loop, and restores back to the original state at the end
- variants() — Returns an array of variants.
- with() — Lets you call any function on all variants that support it, in the same manner as "Object#extend" calls a method from extensions.
- withCommon() — Similar to {@link SearchVariant::with}, except will only use variants that apply to at least one of the classes in the input array, where {@link SearchVariant::with} will run the query on the specific class you give it.