class EntityTestRoutes in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/entity_test/src/Routing/EntityTestRoutes.php \Drupal\entity_test\Routing\EntityTestRoutes
Subscriber for Entity Test routes.
Hierarchy
- class \Drupal\entity_test\Routing\EntityTestRoutes
Expanded class hierarchy of EntityTestRoutes
File
- core/
modules/ system/ tests/ modules/ entity_test/ src/ Routing/ EntityTestRoutes.php, line 10
Namespace
Drupal\entity_test\RoutingView source
class EntityTestRoutes {
/**
* Returns an array of route objects.
*
* @return \Symfony\Component\Routing\Route[]
* An array of route objects.
*/
public function routes() {
$types = entity_test_entity_types(ENTITY_TEST_TYPES_ROUTING);
$routes = [];
foreach ($types as $entity_type_id) {
$routes["entity.{$entity_type_id}.admin_form"] = new Route("{$entity_type_id}/structure/{bundle}", [
'_controller' => '\\Drupal\\entity_test\\Controller\\EntityTestController::testAdmin',
], [
'_permission' => 'administer entity_test content',
], [
'_admin_route' => TRUE,
]);
}
return $routes;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityTestRoutes:: |
public | function | Returns an array of route objects. |