class DenormalizedEntityIndexHijack in Search API Grouping 7.2
Class to hijack the protected method getProcessors().
As this class extends SearchApiIndex it can access protected properties and functions.
Hierarchy
- class \Entity implements EntityInterface
- class \SearchApiIndex
Expanded class hierarchy of DenormalizedEntityIndexHijack
File
- includes/
datasource_denormalized_entity.inc, line 541 - Contains the SearchApiDenormalizedEntityDataSourceController class.
View source
class DenormalizedEntityIndexHijack extends SearchApiIndex {
/**
* Returns the fields to denormalize on.
*
* @param SearchApiIndex $index
* The index to fetch the configuration from.
*
* @return array
* The list of fields to use for denormalization.
*/
public static function getDenormalizeProcessorFields(SearchApiIndex $index) {
$processors = $index
->getProcessors();
if (!empty($processors['search_api_denormalized_entity_field'])) {
return $processors['search_api_denormalized_entity_field']
->getDenormalizationFields();
}
return array();
}
/**
* Returns the permutation limit of a field.
*
* @param SearchApiIndex $index
* The index to fetch the configuration from.
* @param string $field
* The field to get the limit for.
*
* @return int
* The number of permutations to generate from this field. 0 means no limit.
*/
public static function getDenormalizeProcessorFieldLimit(SearchApiIndex $index, $field) {
$processors = $index
->getProcessors();
if (!empty($processors['search_api_denormalized_entity_field'])) {
return $processors['search_api_denormalized_entity_field']
->getDenormalizationFieldLimit($field);
}
return array();
}
/**
* Returns the fields to denormalize on.
*
* @param SearchApiIndex $index
* The index to fetch the configuration from.
*
* @return array
* The list of fields to use for denormalization.
*/
public static function getGroupingProcessorFields(SearchApiIndex $index) {
$processors = $index
->getProcessors();
if (!empty($processors['search_api_denormalized_entity_grouping'])) {
return $processors['search_api_denormalized_entity_grouping']
->getGroupingFields();
}
return array();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DenormalizedEntityIndexHijack:: |
public static | function | Returns the permutation limit of a field. | |
DenormalizedEntityIndexHijack:: |
public static | function | Returns the fields to denormalize on. | |
DenormalizedEntityIndexHijack:: |
public static | function | Returns the fields to denormalize on. | |
Entity:: |
protected | property | 1 | |
Entity:: |
protected | property | ||
Entity:: |
protected | property | ||
Entity:: |
protected | property | ||
Entity:: |
protected | property | ||
Entity:: |
public | function |
Builds a structured array representing the entity's content. Overrides EntityInterface:: |
1 |
Entity:: |
public | function |
Returns the bundle of the entity. Overrides EntityInterface:: |
|
Entity:: |
protected | function | Defines the entity label if the 'entity_class_label' callback is used. | 1 |
Entity:: |
protected | function | Override this in order to implement a custom default URI and specify 'entity_class_uri' as 'uri callback' hook_entity_info(). | |
Entity:: |
public | function |
Permanently deletes the entity. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Returns the info of the type of the entity. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Returns the type of the entity. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Exports the entity. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Gets the raw, translated value of a property or field. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Checks if the entity has a certain exportable status. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Returns the entity identifier, i.e. the entities name or numeric id. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Returns the internal, numeric identifier. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Checks whether the entity is the default revision. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Returns the label of the entity. Overrides EntityInterface:: |
|
Entity:: |
protected | function | Set up the object instance on construction or unserializiation. | |
Entity:: |
public | function |
Returns the uri of the entity just as entity_uri(). Overrides EntityInterface:: |
|
Entity:: |
public | function |
Generate an array for rendering the entity. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Returns the EntityMetadataWrapper of the entity. Overrides EntityInterface:: |
|
Entity:: |
public | function | Magic method to invoke setUp() on unserialization. | |
SearchApiIndex:: |
protected | property | The properties added by data alterations on this index. | |
SearchApiIndex:: |
protected | property | All enabled data alterations for this index. | |
SearchApiIndex:: |
protected | property | Cached return value of datasource(). | |
SearchApiIndex:: |
public | property | A string describing the index' use to users. | |
SearchApiIndex:: |
public | property | A flag indicating whether this index is enabled. | |
SearchApiIndex:: |
protected | property | Static cache for the results of getFields(). | |
SearchApiIndex:: |
protected | property | An array containing two arrays. | |
SearchApiIndex:: |
public | property | An integer identifying the index. Immutable. | |
SearchApiIndex:: |
public | property | The type of items stored in this index. Immutable. | |
SearchApiIndex:: |
public | property | The machine name of the index. Immutable. | |
SearchApiIndex:: |
public | property | A name to be displayed for the index. | |
SearchApiIndex:: |
public | property | An array of options for configuring this index. The layout is as follows (with all keys being optional): | |
SearchApiIndex:: |
protected | property | All enabled processors for this index. | |
SearchApiIndex:: |
public | property | A flag indicating whether to write to this index. | |
SearchApiIndex:: |
public | property | The machine_name of the server with which data should be indexed. | |
SearchApiIndex:: |
protected | property | Cached return value of server(). | |
SearchApiIndex:: |
public | function | Clears this search index and schedules all of its items for re-indexing. | |
SearchApiIndex:: |
public | function | Calls data alteration hooks for a set of items, according to the index options. | |
SearchApiIndex:: |
public | function | Get the controller object of the data source used by this index. | |
SearchApiIndex:: |
public | function | Remove all records of entities to index. | |
SearchApiIndex:: |
public | function | Helper function for creating an entity metadata wrapper appropriate for this index. | |
SearchApiIndex:: |
public | function | Loads all enabled data alterations for this index in proper order. | |
SearchApiIndex:: |
public | function | Get the cache ID prefix used for this index's caches. | |
SearchApiIndex:: |
public | function | Get the entity type of items in this index. | |
SearchApiIndex:: |
public | function | Returns a list of all known fields for this index. | |
SearchApiIndex:: |
public | function | Convenience method for getting all of this index's fulltext fields. | |
SearchApiIndex:: |
public | function | Loads all enabled processors for this index in proper order. | |
SearchApiIndex:: |
public | function | Indexes items on this index. | |
SearchApiIndex:: |
public | function | Helper method to load items from the type lying on this index. | |
SearchApiIndex:: |
public | function | Execute necessary tasks for a newly created index. | |
SearchApiIndex:: |
public | function | Execute necessary tasks when the index is removed from the database. | |
SearchApiIndex:: |
public | function | Postprocess search results before display. | |
SearchApiIndex:: |
public | function | Preprocess data items for indexing. Data added by data alter callbacks will be available on the items. | |
SearchApiIndex:: |
public | function | Preprocess a search query. | |
SearchApiIndex:: |
public | function | Property info alter callback that adds the infos of the properties added by data alter callbacks. | |
SearchApiIndex:: |
public | function | Create a query object for this index. | |
SearchApiIndex:: |
public | function | Record entities to index. | |
SearchApiIndex:: |
public | function | Schedules this search index for re-indexing. | |
SearchApiIndex:: |
public | function | Reset internal caches. | |
SearchApiIndex:: |
public | function |
Saves this index to the database. Overrides Entity:: |
|
SearchApiIndex:: |
public | function | Get the server this index lies on. | |
SearchApiIndex:: |
public | function | Helper method for updating entity properties. | |
SearchApiIndex:: |
public | function |
Constructor as a helper to the parent constructor. Overrides Entity:: |
|
SearchApiIndex:: |
public | function |
Magic method for determining which fields should be serialized. Overrides Entity:: |