Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / system / tests / modules / entity_test / src / Routing / EntityTestRoutes.php
1 <?php
2
3 namespace Drupal\entity_test\Routing;
4
5 use Symfony\Component\Routing\Route;
6
7 /**
8  * Subscriber for Entity Test routes.
9  */
10 class EntityTestRoutes {
11
12   /**
13    * Returns an array of route objects.
14    *
15    * @return \Symfony\Component\Routing\Route[]
16    *   An array of route objects.
17    */
18   public function routes() {
19     $types = entity_test_entity_types(ENTITY_TEST_TYPES_ROUTING);
20
21     $routes = [];
22     foreach ($types as $entity_type_id) {
23       $routes["entity.$entity_type_id.admin_form"] = new Route(
24         "$entity_type_id/structure/{bundle}",
25         ['_controller' => '\Drupal\entity_test\Controller\EntityTestController::testAdmin'],
26         ['_permission' => 'administer entity_test content'],
27         ['_admin_route' => TRUE]
28       );
29     }
30     return $routes;
31   }
32
33 }