3 namespace Drupal\accept_header_routing_test;
5 use Drupal\Core\DependencyInjection\ContainerBuilder;
6 use Drupal\Core\DependencyInjection\ServiceModifierInterface;
9 * Service provider for the accept_header_routing_test module.
11 class AcceptHeaderRoutingTestServiceProvider implements ServiceModifierInterface {
16 public function alter(ContainerBuilder $container) {
17 // Remove the basic content negotation middleware and replace it with a
18 // basic header based one.
19 $container->register('http_middleware.negotiation', 'Drupal\accept_header_routing_test\AcceptHeaderMiddleware')
20 ->addTag('http_middleware', ['priority' => 400]);