You are here

public static function DenormalizedEntityIndexHijack::getDenormalizeProcessorFieldLimit in Search API Grouping 7.2

Returns the permutation limit of a field.

Parameters

SearchApiIndex $index: The index to fetch the configuration from.

string $field: The field to get the limit for.

Return value

int The number of permutations to generate from this field. 0 means no limit.

File

includes/datasource_denormalized_entity.inc, line 571
Contains the SearchApiDenormalizedEntityDataSourceController class.

Class

DenormalizedEntityIndexHijack
Class to hijack the protected method getProcessors().

Code

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();
}