You are here

function search_api_grouping_unwrap_field_type in Search API Grouping 7.2

Unwraps a field type to a certain level.

Parameters

string $type: The field type.

int $level: The levels to unwrap.

Return value

string The unwrapped field type.

1 call to search_api_grouping_unwrap_field_type()
search_api_grouping_views_data_alter in ./search_api_grouping.views.inc
Implements hook_views_data_alter().

File

./search_api_grouping.views.inc, line 95
Views hook implementations for the Search API Grouping module.

Code

function search_api_grouping_unwrap_field_type($type, $level) {
  for ($i = 0; $i < $level; $i++) {
    $type = substr($type, 5, -1);
  }
  return $type;
}