Version 1
[yaffs-website] / web / core / modules / system / tests / modules / router_test_directory / src / RouterTestServiceProvider.php
diff --git a/web/core/modules/system/tests/modules/router_test_directory/src/RouterTestServiceProvider.php b/web/core/modules/system/tests/modules/router_test_directory/src/RouterTestServiceProvider.php
new file mode 100644 (file)
index 0000000..5430e8d
--- /dev/null
@@ -0,0 +1,22 @@
+<?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']);
+  }
+
+}