-
Notifications
You must be signed in to change notification settings - Fork 8
/
liveblog.routing.yml
60 lines (54 loc) · 1.9 KB
/
liveblog.routing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
entity.liveblog_post.canonical:
path: '/liveblog_post/{liveblog_post}'
defaults:
# Calls the view controller, defined in the annotation of the liveblog_post entity
_entity_view: 'liveblog_post'
_title: 'Liveblog post content'
requirements:
# Calls the access controller of the entity, $operation 'view'
_entity_access: 'liveblog_post.view'
entity.liveblog_post.edit_form:
path: '/liveblog_post/{liveblog_post}/edit'
defaults:
# Calls the form.edit controller, defined in the liveblog_post entity.
_entity_form: liveblog_post.edit
_title: 'Edit liveblog post'
requirements:
_entity_access: 'liveblog_post.update'
entity.liveblog_post.edit_form_json:
path: '/liveblog_post/{liveblog_post}/edit'
defaults:
_controller: '\Drupal\liveblog\Controller\LiveblogController::getFormAsJson'
requirements:
_entity_access: 'liveblog_post.update'
_format: json
entity.liveblog_post.delete_form:
path: '/liveblog_post/{liveblog_post}/delete'
defaults:
# Calls the form.delete controller, defined in the liveblog_post entity.
_entity_form: liveblog_post.delete
_title: 'Delete liveblog post'
requirements:
_entity_access: 'liveblog_post.delete'
liveblog_post.liveblog_post_settings:
path: '/admin/structure/liveblog_post_settings'
defaults:
_form: '\Drupal\liveblog\Form\LiveblogPostSettingsForm'
_title: 'Liveblog post settings'
requirements:
_permission: 'administer liveblog_post entity'
liveblog.admin.settings:
path: '/admin/config/content/liveblog'
defaults:
_form: '\Drupal\liveblog\Form\LiveblogSettingsForm'
_title: 'Liveblog settings'
requirements:
_permission: 'administer liveblog settings'
entity.liveblog_post.list:
path: '/liveblog/{node}/posts'
defaults:
_controller: '\Drupal\liveblog\Controller\LiveblogListController::getList'
requirements:
_permission: 'access content'
_format: json
node: \d+