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: comment_type_add:
route_name: comment.type_add route_name: entity.comment_type.add_form
title: 'Add comment type' title: 'Add comment type'
appears_on: appears_on:
- comment.type_list - comment.type_list

View File

@ -1,16 +1,16 @@
comment.permalink_tab: entity.comment.canonical_tab:
route_name: comment.permalink route_name: entity.comment.canonical
title: 'View comment' title: 'View comment'
base_route: comment.permalink base_route: entity.comment.canonical
comment.edit_page_tab: entity.comment.edit_form_tab:
route_name: comment.edit_page route_name: entity.comment.edit_form
title: 'Edit' title: 'Edit'
base_route: comment.permalink base_route: entity.comment.canonical
weight: 0 weight: 0
comment.confirm_delete_tab: entity.comment.delete_form_tab:
route_name: comment.confirm_delete route_name: entity.comment.delete_form
title: 'Delete' title: 'Delete'
base_route: comment.permalink base_route: entity.comment.canonical
weight: 10 weight: 10
comment.admin: comment.admin:
@ -31,7 +31,7 @@ comment.admin_approval:
weight: 1 weight: 1
# Default tab for comment type editing. # Default tab for comment type editing.
comment.type_edit: entity.comment_type.edit_form:
title: 'Edit' title: 'Edit'
route_name: comment.type_edit route_name: entity.comment_type.edit_form
base_route: comment.type_edit 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) { function comment_uri(CommentInterface $comment) {
return new Url( return new Url(
'comment.permalink', 'entity.comment.canonical',
array( array(
'comment' => $comment->id(), 'comment' => $comment->id(),
), ),

View File

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

View File

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

View File

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

View File

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