hal.services.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. services:
  2. serializer.normalizer.entity_reference_item.hal:
  3. class: Drupal\hal\Normalizer\EntityReferenceItemNormalizer
  4. arguments: ['@hal.link_manager', '@serializer.entity_resolver', '@entity_type.manager']
  5. tags:
  6. - { name: normalizer, priority: 10 }
  7. serializer.normalizer.field_item.hal:
  8. class: Drupal\hal\Normalizer\FieldItemNormalizer
  9. tags:
  10. - { name: normalizer, priority: 10 }
  11. serializer.normalizer.field.hal:
  12. class: Drupal\hal\Normalizer\FieldNormalizer
  13. tags:
  14. - { name: normalizer, priority: 10 }
  15. serializer.normalizer.file_entity.hal:
  16. class: Drupal\hal\Normalizer\FileEntityNormalizer
  17. deprecated: 'The "%service_id%" normalizer service is deprecated: it is obsolete, it only remains available for backwards compatibility.'
  18. arguments: ['@entity.manager', '@hal.link_manager', '@module_handler', '@config.factory']
  19. tags:
  20. - { name: normalizer, priority: 20 }
  21. serializer.normalizer.timestamp_item.hal:
  22. class: Drupal\hal\Normalizer\TimestampItemNormalizer
  23. tags:
  24. # Priority must be higher than serializer.normalizer.field_item.hal.
  25. - { name: normalizer, priority: 20, bc: bc_timestamp_normalizer_unix, bc_config_name: 'serialization.settings' }
  26. serializer.normalizer.entity.hal:
  27. class: Drupal\hal\Normalizer\ContentEntityNormalizer
  28. arguments: ['@hal.link_manager', '@entity.manager', '@module_handler']
  29. tags:
  30. - { name: normalizer, priority: 10 }
  31. serializer.encoder.hal:
  32. class: Drupal\hal\Encoder\JsonEncoder
  33. tags:
  34. - { name: encoder, priority: 10, format: hal_json }
  35. # Link managers.
  36. hal.link_manager:
  37. class: Drupal\hal\LinkManager\LinkManager
  38. arguments: ['@hal.link_manager.type', '@hal.link_manager.relation']
  39. hal.link_manager.type:
  40. class: Drupal\hal\LinkManager\TypeLinkManager
  41. arguments: ['@cache.default', '@module_handler', '@config.factory', '@request_stack', '@entity_type.bundle.info']
  42. hal.link_manager.relation:
  43. class: Drupal\hal\LinkManager\RelationLinkManager
  44. arguments: ['@cache.default', '@entity.manager', '@module_handler', '@config.factory', '@request_stack']