Problem/Motivation

When providing a custom hierarchy callback for facets, the current parameters passed to the function are the build values only.
Some more context might be needed in some cases.
For example, my hierarchy has to be built based on an user selection of terms. This configuration differs for each facet.

Proposed resolution

Add the adapter and the facet to the callback parameters, like it's done for the alter callbacks.

User interface changes

None.

API changes

None. The existing facetapi_get_taxonomy_hierarchy() was intentionally left without those parameters as other modules (like search_api_facet) might be using that function with only the values parameter, and adding a default value doesn't seem a good idea as those parameters are actually always there.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sardara’s picture