current_search.api.php 894 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * @file
  4. * Hooks provided by the Current Search Blocks module.
  5. */
  6. /**
  7. * @addtogroup hooks
  8. * @{
  9. */
  10. /**
  11. * Define all current search item provided by the module.
  12. *
  13. * Current search items are elements that are added to the current search block
  14. * such as a list of active facet items, custom text, etc.
  15. *
  16. * @return array
  17. * An associative array keyed by unique name of the current search item. Each
  18. * item item is an associative array keyed by "handler" containing:
  19. * - label: The human readable name of the plugin displayed in the admin UI.
  20. * - class: The name of the plugin class.
  21. *
  22. * @see CurrentSearchItem
  23. */
  24. function hook_current_search_items() {
  25. return array(
  26. 'text' => array(
  27. 'handler' => array(
  28. 'label' => t('Custom text'),
  29. 'class' => 'CurrentSearchItemText',
  30. ),
  31. ),
  32. );
  33. }
  34. /**
  35. * @} End of "addtogroup hooks".
  36. */