rest.services.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. services:
  2. plugin.manager.rest:
  3. class: Drupal\rest\Plugin\Type\ResourcePluginManager
  4. arguments: ['@container.namespaces', '@cache.discovery', '@module_handler']
  5. cache.rest:
  6. class: Drupal\Core\Cache\CacheBackendInterface
  7. tags:
  8. - { name: cache.bin }
  9. factory: cache_factory:get
  10. arguments: [rest]
  11. # @todo Remove this service in Drupal 9.0.0.
  12. access_check.rest.csrf:
  13. alias: access_check.header.csrf
  14. rest.resource_routes:
  15. class: Drupal\rest\Routing\ResourceRoutes
  16. arguments: ['@plugin.manager.rest', '@entity_type.manager', '@logger.channel.rest']
  17. tags:
  18. - { name: 'event_subscriber' }
  19. logger.channel.rest:
  20. parent: logger.channel_base
  21. arguments: ['rest']
  22. # Event subscribers.
  23. rest.resource_response.subscriber:
  24. class: Drupal\rest\EventSubscriber\ResourceResponseSubscriber
  25. tags:
  26. - { name: event_subscriber }
  27. arguments: ['@serializer', '@renderer', '@current_route_match']
  28. rest.config_subscriber:
  29. class: Drupal\rest\EventSubscriber\RestConfigSubscriber
  30. arguments: ['@router.builder']
  31. tags:
  32. - { name: event_subscriber }
  33. rest.resource.entity.post_route.subscriber:
  34. class: \Drupal\rest\EventSubscriber\EntityResourcePostRouteSubscriber
  35. arguments: ['@entity_type.manager']
  36. tags:
  37. - { name: event_subscriber }
  38. # @todo Remove in Drupal 9.0.0.
  39. rest.path_processor_entity_resource_bc:
  40. class: \Drupal\rest\PathProcessor\PathProcessorEntityResourceBC
  41. arguments: ['@entity_type.manager']
  42. tags:
  43. - { name: path_processor_inbound }
  44. rest.route_processor_get_bc:
  45. class: \Drupal\rest\RouteProcessor\RestResourceGetRouteProcessorBC
  46. arguments: ['%serializer.formats%', '@router.route_provider']
  47. tags:
  48. - { name: route_processor_outbound }