aggregator.api.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * @file
  4. * Aggregator API documentation.
  5. */
  6. /**
  7. * @addtogroup hooks
  8. * @{
  9. */
  10. /**
  11. * Perform alterations on the available fetchers.
  12. *
  13. * @param array[] $info
  14. * Array of fetcher plugins
  15. */
  16. function hook_aggregator_fetcher_info_alter(array &$info) {
  17. if (empty($info['foo_fetcher'])) {
  18. return;
  19. }
  20. $info['foo_fetcher']['class'] = Drupal\foo\Plugin\aggregator\fetcher\FooDefaultFetcher::class;
  21. }
  22. /**
  23. * Perform alterations on the available parsers.
  24. *
  25. * @param array[] $info
  26. * Array of parser plugins
  27. */
  28. function hook_aggregator_parser_info_alter(array &$info) {
  29. if (empty($info['foo_parser'])) {
  30. return;
  31. }
  32. $info['foo_parser']['class'] = Drupal\foo\Plugin\aggregator\parser\FooDefaultParser::class;
  33. }
  34. /**
  35. * Perform alterations on the available processors.
  36. *
  37. * @param array[] $info
  38. * Array of processor plugins
  39. */
  40. function hook_aggregator_processor_info_alter(array &$info) {
  41. if (empty($info['foo_processor'])) {
  42. return;
  43. }
  44. $info['foo_processor']['class'] = Drupal\foo\Plugin\aggregator\processor\FooDefaultProcessor::class;
  45. }
  46. /**
  47. * @} End of "addtogroup hooks".
  48. */