Drupal investigation

serialization.services.yml 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. services:
  2. serializer:
  3. class: Symfony\Component\Serializer\Serializer
  4. arguments: [{ }, { }]
  5. serializer.normalizer.config_entity:
  6. class: Drupal\serialization\Normalizer\ConfigEntityNormalizer
  7. tags:
  8. - { name: normalizer }
  9. arguments: ['@entity.manager']
  10. serializer.normalizer.content_entity:
  11. class: Drupal\serialization\Normalizer\ContentEntityNormalizer
  12. tags:
  13. - { name: normalizer }
  14. arguments: ['@entity.manager']
  15. serializer.normalizer.entity:
  16. class: Drupal\serialization\Normalizer\EntityNormalizer
  17. tags:
  18. - { name: normalizer }
  19. arguments: ['@entity.manager']
  20. serializer.normalizer.primitive_data:
  21. class: Drupal\serialization\Normalizer\PrimitiveDataNormalizer
  22. tags:
  23. - { name: normalizer, priority: 5, bc: bc_primitives_as_strings, bc_config_name: 'serialization.settings' }
  24. serializer.normalizer.complex_data:
  25. class: Drupal\serialization\Normalizer\ComplexDataNormalizer
  26. tags:
  27. - { name: normalizer }
  28. serializer.normalizer.entity_reference_field_item:
  29. class: Drupal\serialization\Normalizer\EntityReferenceFieldItemNormalizer
  30. tags:
  31. # Set the priority lower than the hal entity reference field item
  32. # normalizer, so that we do not replace that for hal_json but higher than
  33. # this modules generic field item normalizer.
  34. # @todo Find a better way for this in https://www.drupal.org/node/2575761.
  35. - { name: normalizer, priority: 8 }
  36. serialization.normalizer.field_item:
  37. class: Drupal\serialization\Normalizer\FieldItemNormalizer
  38. tags:
  39. # Priority must be lower than serializer.normalizer.field_item.hal and any
  40. # field type specific normalizer such as
  41. # serializer.normalizer.entity_reference_field_item.
  42. - { name: normalizer, priority: 6 }
  43. serialization.normalizer.field:
  44. class: Drupal\serialization\Normalizer\FieldNormalizer
  45. tags:
  46. # Priority must be lower than serializer.normalizer.field.hal.
  47. - { name: normalizer, priority: 6 }
  48. serializer.normalizer.list:
  49. class: Drupal\serialization\Normalizer\ListNormalizer
  50. tags:
  51. # Priority must be higher than serialization.normalizer.field but less
  52. # than hal field normalizer.
  53. - { name: normalizer, priority: 9 }
  54. serializer.normalizer.password_field_item:
  55. class: Drupal\serialization\Normalizer\NullNormalizer
  56. arguments: ['Drupal\Core\Field\Plugin\Field\FieldType\PasswordItem']
  57. tags:
  58. - { name: normalizer, priority: 20 }
  59. serializer.normalizer.safe_string:
  60. class: Drupal\serialization\Normalizer\MarkupNormalizer
  61. tags:
  62. - { name: normalizer }
  63. serializer.normalizer.typed_data:
  64. class: Drupal\serialization\Normalizer\TypedDataNormalizer
  65. tags:
  66. - { name: normalizer }
  67. serializer.encoder.json:
  68. class: Drupal\serialization\Encoder\JsonEncoder
  69. tags:
  70. - { name: encoder, format: json }
  71. serializer.encoder.xml:
  72. class: Drupal\serialization\Encoder\XmlEncoder
  73. tags:
  74. - { name: encoder, format: xml }
  75. serializer.entity_resolver:
  76. class: Drupal\serialization\EntityResolver\ChainEntityResolver
  77. serializer.entity_resolver.uuid:
  78. class: Drupal\serialization\EntityResolver\UuidResolver
  79. tags:
  80. - { name: entity_resolver}
  81. arguments: ['@entity.manager']
  82. serialization.entity_resolver.target_id:
  83. class: Drupal\serialization\EntityResolver\TargetIdResolver
  84. tags:
  85. - { name: entity_resolver}
  86. serialization.exception.default:
  87. class: Drupal\serialization\EventSubscriber\DefaultExceptionSubscriber
  88. tags:
  89. - { name: event_subscriber }
  90. arguments: ['@serializer', '%serializer.formats%']
  91. serialization.user_route_alter_subscriber:
  92. class: Drupal\serialization\EventSubscriber\UserRouteAlterSubscriber
  93. tags:
  94. - { name: event_subscriber }
  95. arguments: ['%serializer.formats%']
  96. serialization.bc_config_subscriber:
  97. class: Drupal\serialization\EventSubscriber\BcConfigSubscriber
  98. tags:
  99. - { name: event_subscriber }
  100. arguments: ['@kernel']