Issue #2314867 by Crell: Standardize comment entity route names.

8.0.x
webchick 2014-08-04 10:19:44 -07:00
parent 4d7bb09016
commit cb24b1e304
7 changed files with 28 additions and 28 deletions

View File

@ -1,5 +1,5 @@
comment_type_add:
route_name: comment.type_add
route_name: entity.comment_type.add_form
title: 'Add comment type'
appears_on:
- comment.type_list

View File

@ -1,16 +1,16 @@
comment.permalink_tab:
route_name: comment.permalink
entity.comment.canonical_tab:
route_name: entity.comment.canonical
title: 'View comment'
base_route: comment.permalink
comment.edit_page_tab:
route_name: comment.edit_page
base_route: entity.comment.canonical
entity.comment.edit_form_tab:
route_name: entity.comment.edit_form
title: 'Edit'
base_route: comment.permalink
base_route: entity.comment.canonical
weight: 0
comment.confirm_delete_tab:
route_name: comment.confirm_delete
entity.comment.delete_form_tab:
route_name: entity.comment.delete_form
title: 'Delete'
base_route: comment.permalink
base_route: entity.comment.canonical
weight: 10
comment.admin:
@ -31,7 +31,7 @@ comment.admin_approval:
weight: 1
# Default tab for comment type editing.
comment.type_edit:
entity.comment_type.edit_form:
title: 'Edit'
route_name: comment.type_edit
base_route: comment.type_edit
route_name: entity.comment_type.edit_form
base_route: entity.comment_type.edit_form

View File

@ -98,7 +98,7 @@ function comment_help($route_name, RouteMatchInterface $route_match) {
*/
function comment_uri(CommentInterface $comment) {
return new Url(
'comment.permalink',
'entity.comment.canonical',
array(
'comment' => $comment->id(),
),

View File

@ -16,7 +16,7 @@ comment.admin_approval:
requirements:
_permission: 'administer comments'
comment.edit_page:
entity.comment.edit_form:
path: '/comment/{comment}/edit'
defaults:
_title: 'Edit'
@ -34,7 +34,7 @@ comment.approve:
_entity_access: 'comment.approve'
_csrf_token: 'TRUE'
comment.permalink:
entity.comment.canonical:
path: '/comment/{comment}'
defaults:
_title: 'Comment permalink'
@ -42,7 +42,7 @@ comment.permalink:
requirements:
_entity_access: 'comment.view'
comment.confirm_delete:
entity.comment.delete_form:
path: '/comment/{comment}/delete'
defaults:
_title: 'Delete'
@ -84,7 +84,7 @@ comment.type_list:
options:
_admin_route: TRUE
comment.type_delete:
entity.comment_type.delete_form:
path: '/admin/structure/comment/manage/{comment_type}/delete'
defaults:
_entity_form: 'comment_type.delete'
@ -94,7 +94,7 @@ comment.type_delete:
options:
_admin_route: TRUE
comment.type_add:
entity.comment_type.add_form:
path: '/admin/structure/comment/types/add'
defaults:
_entity_form: 'comment_type.add'
@ -104,7 +104,7 @@ comment.type_add:
options:
_admin_route: TRUE
comment.type_edit:
entity.comment_type.edit_form:
path: '/admin/structure/comment/manage/{comment_type}'
defaults:
_entity_form: 'comment_type.edit'

View File

@ -45,10 +45,10 @@ use Drupal\user\UserInterface;
* "uuid" = "uuid"
* },
* links = {
* "canonical" = "comment.permalink",
* "delete-form" = "comment.confirm_delete",
* "edit-form" = "comment.edit_page",
* "admin-form" = "comment.type_edit"
* "canonical" = "entity.comment.canonical",
* "delete-form" = "entity.comment.delete_form",
* "edit-form" = "entity.comment.edit_form",
* "admin-form" = "entity.comment_type.edit_form"
* },
* bundle_entity_type = "comment_type"
* )

View File

@ -34,9 +34,9 @@ use Drupal\comment\CommentTypeInterface;
* "label" = "label"
* },
* links = {
* "delete-form" = "comment.type_delete",
* "edit-form" = "comment.type_edit",
* "add-form" = "comment.type_add"
* "delete-form" = "entity.comment_type.delete_form",
* "edit-form" = "entity.comment_type.edit_form",
* "add-form" = "entity.comment_type.add_form"
* }
* )
*/

View File

@ -216,7 +216,7 @@ class CommentAdminOverview extends FormBase {
$links = array();
$links['edit'] = array(
'title' => $this->t('Edit'),
'route_name' => 'comment.edit_page',
'route_name' => 'entity.comment.edit_form',
'route_parameters' => array('comment' => $comment->id()),
'options' => $comment_uri_options,
'query' => $destination,