entity_test.routing.yml 2.02 KB
Newer Older
1
entity.entity_test.canonical:
2
  path: '/entity_test/{entity_test}'
3
  defaults:
4
    _entity_view: 'entity_test.full'
5
    _title: 'Test full view mode'
6 7 8
  requirements:
    _access: 'TRUE'

9
entity.entity_test.render_options:
10
  path: '/entity_test_converter/{foo}'
11 12 13
  options:
    parameters:
      foo:
14
        type: 'entity:entity_test'
15
  defaults:
16
    _entity_view: 'entity_test.full'
17 18 19
  requirements:
    _access: 'TRUE'

20
entity.entity_test.render_no_view_mode:
21
  path: '/entity_test_no_view_mode/{entity_test}'
22
  defaults:
23
    _entity_view: 'entity_test'
24 25
  requirements:
    _access: 'TRUE'
26

27
entity.entity_test.collection_referencing_entities:
28 29
  path: '/entity_test/list/{entity_reference_field_name}/{referenced_entity_type}/{referenced_entity_id}'
  defaults:
30
    _controller: '\Drupal\entity_test\Controller\EntityTestController::listReferencingEntities'
31 32 33 34
    _title: 'List entity_test entities referencing the given entity'
  requirements:
    _access: 'TRUE'

35
entity.entity_test.collection_labels_alphabetically:
36 37
  path: '/entity_test/list_labels_alphabetically/{entity_type_id}'
  defaults:
38
    _controller: '\Drupal\entity_test\Controller\EntityTestController::listEntitiesAlphabetically'
39 40 41 42
    _title: 'List labels of entities of the given entity type alphabetically'
  requirements:
    _access: 'TRUE'

43
entity.entity_test.collection_empty:
44 45
  path: '/entity_test/list_empty/{entity_type_id}'
  defaults:
46
    _controller: '\Drupal\entity_test\Controller\EntityTestController::listEntitiesEmpty'
47 48 49 50
    _title: 'Empty list of entities of the given entity type, empty because no entities match the query'
  requirements:
    _access: 'TRUE'

51 52 53 54 55 56 57 58 59 60 61 62 63
entity.block.test_operation:
  path: '/admin/structure/block/manage/{block}/test_operation'
  defaults:
    _entity_view: 'entity_test'
  requirements:
    _access: 'TRUE'

entity.user_role.test_operation:
  path: '/admin/people/roles/manage/{user_role}/test_operation'
  defaults:
    _entity_view: 'entity_test'
  requirements:
    _access: 'TRUE'
64

65 66
route_callbacks:
  - '\Drupal\entity_test\Routing\EntityTestRoutes::routes'