RouterTestServiceProvider.php

Same filename in other branches
  1. 9 core/modules/system/tests/modules/router_test_directory/src/RouterTestServiceProvider.php
  2. 10 core/modules/system/tests/modules/router_test_directory/src/RouterTestServiceProvider.php
  3. 11.x core/modules/system/tests/modules/router_test_directory/src/RouterTestServiceProvider.php

Namespace

Drupal\router_test

File

core/modules/system/tests/modules/router_test_directory/src/RouterTestServiceProvider.php

View source
<?php

namespace Drupal\router_test;

use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceProviderInterface;

/**
 * Registers a dynamic route provider.
 */
class RouterTestServiceProvider implements ServiceProviderInterface {
    
    /**
     * {@inheritdoc}
     */
    public function register(ContainerBuilder $container) {
        $container->register('router_test.subscriber', 'Drupal\\router_test\\RouteTestSubscriber')
            ->addTag('event_subscriber');
        $container->register('access_check.router_test', 'Drupal\\router_test\\Access\\TestAccessCheck')
            ->addTag('access_check', [
            'applies_to' => '_access_router_test',
        ]);
    }

}

Classes

Title Deprecated Summary
RouterTestServiceProvider Registers a dynamic route provider.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.