You are here

public function SearchApiDenormalizedEntityDataSourceController::getItemLabel in Search API Grouping 7.2

Get a human-readable label for an item.

Parameters

object $item: An item of this controller's type.

Return value

string|NULL Either a human-readable label for the item, or NULL if none is available.

Overrides SearchApiEntityDataSourceController::getItemLabel

File

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

Class

SearchApiDenormalizedEntityDataSourceController
Data source for all entities known to the Entity API.

Code

public function getItemLabel($item) {
  $label = entity_label($this
    ->getEntityType(), $item);
  return $label ? $label : NULL;
}