summaryrefslogtreecommitdiffstats
path: root/jsonapi_extras.services.yml
blob: d8795bd3d4c6551acd6035cba419c6e92c060f90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
services:
  route_subscriber.alter_jsonapi:
    class: Drupal\jsonapi_extras\EventSubscriber\JsonApiExtrasRouteAlterSubscriber
    arguments:
      - '@jsonapi.resource_type.repository'
      - '@config.factory'
    tags:
      - { name: event_subscriber }

  serializer.normalizer.field_item.jsonapi_extras:
    class: Drupal\jsonapi_extras\Normalizer\FieldItemNormalizer
    arguments:
      - '@serializer.normalizer.field_item.jsonapi'
      - '@entity_type.manager'
      - '@plugin.manager.resource_field_enhancer'
    tags:
      - { name: normalizer, priority: 25 }

  serializer.normalizer.entity.jsonapi_extras:
    class: Drupal\jsonapi_extras\Normalizer\ContentEntityNormalizer
    arguments: ['@jsonapi.link_manager', '@jsonapi.resource_type.repository', '@entity_type.manager']
    tags:
      - { name: normalizer, priority: 22 }
  serializer.normalizer.config_entity.jsonapi_extras:
    class: Drupal\jsonapi_extras\Normalizer\ConfigEntityNormalizer
    arguments: ['@jsonapi.link_manager', '@jsonapi.resource_type.repository', '@entity_type.manager']
    tags:
      - { name: normalizer, priority: 22 }

  plugin.manager.resource_field_enhancer:
    class: Drupal\jsonapi_extras\Plugin\ResourceFieldEnhancerManager
    parent: default_plugin_manager