You are here

jsonapi_resources.services.yml in JSON:API Resources 8

File

jsonapi_resources.services.yml
View source
  1. # Important:
  2. # Even if the service is public, all services are for internal use only!
  3. services:
  4. controller.jsonapi_resource:
  5. class: Drupal\jsonapi_resources\Unstable\Controller\JsonapiResourceController
  6. arguments: ['@jsonapi_resources.class_resolver', '@jsonapi_resources.controller.argument_resolver']
  7. # Enhances http_kernel.controller.argument_resolver with the ability to
  8. # resolve request payloads into a JSON:API resource processor argument.
  9. jsonapi_resources.controller.argument_resolver:
  10. class: Symfony\Component\HttpKernel\Controller\ArgumentResolver
  11. arguments: ['@http_kernel.controller.argument_metadata_factory', ['@argument_resolver.request_attribute', '@argument_resolver.request', '@argument_resolver.psr7_request', '@argument_resolver.route_match', '@jsonapi_resources.argument_resolver.document', '@argument_resolver.default']]
  12. public: false
  13. jsonapi_resources.argument_resolver.document:
  14. class: Drupal\jsonapi_resources\Unstable\Controller\ArgumentResolver\DocumentResolver
  15. arguments: ['@jsonapi_resources.document_extractor']
  16. public: false
  17. jsonapi_resources.resource_response_factory:
  18. class: Drupal\jsonapi_resources\Unstable\ResourceResponseFactory
  19. arguments: ['@jsonapi.include_resolver']
  20. jsonapi_resources.document_extractor:
  21. class: Drupal\jsonapi_resources\Unstable\DocumentExtractor
  22. arguments: ['@jsonapi.serializer', '@jsonapi.resource_type.repository', '@entity_type.manager']
  23. route_subscriber.jsonapi_resource:
  24. class: Drupal\jsonapi_resources\Unstable\Routing\ResourceRoutes
  25. arguments: ['@jsonapi.resource_type.repository', '%authentication_providers%', '%jsonapi.base_path%', '@service_container']
  26. tags:
  27. - { name: event_subscriber }
  28. route_enhancer.jsonapi_resource:
  29. class: Drupal\jsonapi_resources\Unstable\Routing\Enhancer\ResourceEnhancer
  30. arguments: ['@jsonapi_resources.class_resolver', '@current_route_match']
  31. tags:
  32. - { name: route_enhancer }
  33. jsonapi_resources.class_resolver:
  34. parent: class_resolver
  35. class: Drupal\jsonapi_resources\Unstable\DependencyInjection\JsonapiResourceClassResolver
  36. public: false
  37. jsonapi_resources.resource_object_to_entity_mapper:
  38. class: Drupal\jsonapi_resources\Unstable\Entity\ResourceObjectToEntityMapper
  39. arguments: ['@jsonapi.serializer']
  40. # Utility service for capturing leaked cacheability metadata from entity query executions.
  41. jsonapi_resources.entity_query_executor:
  42. class: Drupal\jsonapi_resources\Unstable\Entity\Query\CacheabilityCapturingExecutor
  43. arguments: ['@renderer']
  44. # Makes the JSON:API entity access checker public so it can be injected by EntityResourceBase::create().
  45. jsonapi_resources.entity_access_checker:
  46. parent: jsonapi.entity_access_checker
  47. class: Drupal\jsonapi\Access\EntityAccessChecker
  48. public: true