\SearchVariantSubsites

Synopsis

class SearchVariantSubsites extends SearchVariant {
}

Hierarchy

Extends

Tasks

Line Task
13 refactor subsites to inherit a common interface, so we can run introspection once only.

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)
  • $variants
    Holds a cache of all variants

Methods

protected

  • isFieldFiltered() — Determine if a field with a certain name is filtered by the search query or on the index This is the equivalent of saying "show me the results that do ONLY contain this value"

public

  • activateState()
  • alterDefinition()
  • alterQuery() — This field has been altered to allow a user to obtain search results for a particular subsite When attempting to do this in project code, SearchVariantSubsites kicks and overwrites any filter you've applied This fix prevents the module from doing this if a filter is applied on the index or the query, or if a field is being excluded specifically before being executed.
  • appliesTo()
  • appliesToEnvironment()
  • currentState()
  • extractManipulationWriteState() — We need _really_ complicated logic to find just the changed subsites (because we use versions there's no explicit deletes, just new versions with different members) so just always use all of them
  • reindexStates()

Inherited from 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,
  • 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.