You are here

function _party_hat_facet_create_label in Party 8.2

Same name and namespace in other branches
  1. 7 modules/party_hat/party_hat.module \_party_hat_facet_create_label()

Get the right mapping for party_hat facets

1 string reference to '_party_hat_facet_create_label'
party_hat_facetapi_facet_info_alter in modules/party_hat/party_hat.module
Implements hook_facetapi_facet_info_alter().

File

modules/party_hat/party_hat.module, line 804
party_hat.module Provides an extensible access system for parties.

Code

function _party_hat_facet_create_label(array $values, array $search) {
  $entities = entity_load('party_hat', $values);
  $map = array();
  foreach ($entities as $id => $hat) {
    $label = entity_label('party_hat', $hat);
    if ($label) {
      $map[$hat->name] = $label;
    }
  }
  return $map;
}