search_api_facetapi.api.php 669 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * @file
  4. * Hooks provided by the Search facets module.
  5. */
  6. /**
  7. * @addtogroup hooks
  8. * @{
  9. */
  10. /**
  11. * Lets modules alter the search keys that are returned to FacetAPI and used
  12. * in the current search block and breadcrumb trail.
  13. *
  14. * @param string $keys
  15. * The string representing the user's current search query.
  16. * @param SearchApiQuery $query
  17. * The SearchApiQuery object for the current search.
  18. */
  19. function hook_search_api_facetapi_keys_alter(&$keys, $query) {
  20. if ($keys == '[' . t('all items') . ']') {
  21. // Change $keys to something else, perhaps based on filters in the query
  22. // object.
  23. }
  24. }
  25. /**
  26. * @} End of "addtogroup hooks".
  27. */