rest.services.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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 }