farm-2.x-dev/modules/core/api/farm_api.services.yml
modules/core/api/farm_api.services.yml
services:
# Add CORS headers for allowed origins configured on consumers.
farm_api.cors_event_subscriber:
class: Drupal\farm_api\EventSubscriber\CorsResponseEventSubscriber
arguments: ['@entity_type.manager']
tags:
- { name: event_subscriber }
# Alter the root /api endpoint to include a meta.farm object.
farm_api.route_subscriber:
class: Drupal\farm_api\Routing\RouteSubscriber
tags:
- { name: event_subscriber }
farm_api.repositories.scope:
class: Drupal\farm_api\Repositories\FarmScopeRepository
decorates: simple_oauth.repositories.scope
arguments: [ '@entity_type.manager' ]
