comment.routing.yml 2.92 KB
Newer Older
1 2 3 4
comment.admin:
  path: '/admin/content/comment'
  defaults:
    _title: 'Comments'
5
    _content: '\Drupal\comment\Controller\AdminController::adminPage'
6 7 8 9 10 11 12 13
    type: 'new'
  requirements:
    _permission: 'administer comments'

comment.admin_approval:
  path: '/admin/content/comment/approval'
  defaults:
    _title: 'Unapproved comments'
14
    _content: '\Drupal\comment\Controller\AdminController::adminPage'
15 16 17 18
    type: 'approval'
  requirements:
    _permission: 'administer comments'

19
comment.edit_page:
20
  path: '/comment/{comment}/edit'
21
  defaults:
22
    _title: 'Edit'
23 24 25
    _entity_form: 'comment.default'
  requirements:
    _entity_access: 'comment.update'
26

27
comment.approve:
28
  path: '/comment/{comment}/approve'
29
  defaults:
30
    _title: 'Approve'
31 32 33 34
    _content: '\Drupal\comment\Controller\CommentController::commentApprove'
    entity_type: 'comment'
  requirements:
    _entity_access: 'comment.approve'
35
    _csrf_token: 'TRUE'
36

37
comment.permalink:
38
  path: '/comment/{comment}'
39
  defaults:
40
    _title: 'Comment permalink'
41 42 43
    _controller: '\Drupal\comment\Controller\CommentController::commentPermalink'
  requirements:
    _entity_access: 'comment.view'
44

45
comment.confirm_delete:
46
  path: '/comment/{comment}/delete'
47
  defaults:
48
    _title: 'Delete'
49 50 51
    _entity_form: 'comment.delete'
  requirements:
    _entity_access: 'comment.delete'
52

53
comment.reply:
54
  path: '/comment/reply/{entity_type}/{entity_id}/{field_name}/{pid}'
55 56
  defaults:
    _content: '\Drupal\comment\Controller\CommentController::getReplyForm'
57
    _title: 'Add new comment'
58 59
    pid: ~
  requirements:
60
    _access: 'TRUE'
61

62
comment.new_comments_node_links:
63
  path: '/comments/render_new_comments_node_links'
64 65 66 67
  defaults:
    _controller: '\Drupal\comment\Controller\CommentController::renderNewCommentsNodeLinks'
  requirements:
    _permission: 'access content'
68

69 70 71 72 73 74 75
comment.node_redirect:
  path: '/comment/{node}/reply'
  defaults:
    _controller: 'Drupal\comment\Controller\CommentController::redirectNode'
  requirements:
    _entity_access: 'node.view'
    _module_dependencies: 'node'
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115

comment.type_list:
  path: '/admin/structure/comment'
  defaults:
    _entity_list: 'comment_type'
    _title: 'Comment types'
  requirements:
    _permission: 'administer comment types'
  options:
    _admin_route: TRUE

comment.type_delete:
  path: '/admin/structure/comment/manage/{comment_type}/delete'
  defaults:
    _entity_form: 'comment_type.delete'
    _title: 'Delete'
  requirements:
    _entity_access: 'comment_type.delete'
  options:
    _admin_route: TRUE

comment.type_add:
  path: '/admin/structure/comment/types/add'
  defaults:
    _entity_form: 'comment_type.add'
    _title: 'Add'
  requirements:
    _permission: 'administer comment types'
  options:
    _admin_route: TRUE

comment.type_edit:
  path: '/admin/structure/comment/manage/{comment_type}'
  defaults:
    _entity_form: 'comment_type.edit'
    _title: 'Edit'
  requirements:
    _entity_access: 'comment_type.update'
  options:
    _admin_route: TRUE