Commit 37e7f6a4 authored by webchick's avatar webchick

Issue #2314861 by Crell: Standardize aggregator entity route names.

parent 45d55e6a
......@@ -8,16 +8,16 @@ aggregator.admin_settings:
weight: 100
base_route: aggregator.admin_overview
aggregator.feed_view:
route_name: aggregator.feed_view
base_route: aggregator.feed_view
entity.aggregator_feed.canonical:
route_name: entity.aggregator_feed.canonical
base_route: entity.aggregator_feed.canonical
title: View
aggregator.feed_configure:
route_name: aggregator.feed_configure
base_route: aggregator.feed_view
entity.aggregator_feed.edit_form:
route_name: entity.aggregator_feed.edit_form
base_route: entity.aggregator_feed.canonical
title: 'Configure'
weight: 10
aggregator.feed_delete:
route_name: aggregator.feed_delete
tab_root_id: aggregator.feed_view
entity.aggregator_feed.delete_form:
route_name: entity.aggregator_feed.delete_form
tab_root_id: entity.aggregator_feed.canonical
title: Delete
......@@ -49,7 +49,7 @@ aggregator.feed_add:
options:
_admin_route: TRUE
aggregator.feed_view:
entity.aggregator_feed.canonical:
path: '/aggregator/sources/{aggregator_feed}'
defaults:
_content: '\Drupal\aggregator\Controller\AggregatorController::viewFeed'
......@@ -57,7 +57,7 @@ aggregator.feed_view:
requirements:
_permission: 'access news feeds'
aggregator.feed_configure:
entity.aggregator_feed.edit_form:
path: '/aggregator/sources/{aggregator_feed}/configure'
defaults:
_entity_form: 'aggregator_feed.default'
......@@ -67,7 +67,7 @@ aggregator.feed_configure:
options:
_admin_route: TRUE
aggregator.feed_delete:
entity.aggregator_feed.delete_form:
path: '/aggregator/sources/{aggregator_feed}/delete'
defaults:
_entity_form: 'aggregator_feed.delete'
......
......@@ -149,12 +149,12 @@ public function adminOverview() {
$row[] = ($last_checked && $refresh_rate ? $this->t('%time left', array('%time' => $this->dateFormatter->formatInterval($last_checked + $refresh_rate - REQUEST_TIME))) : $this->t('never'));
$links['edit'] = array(
'title' => $this->t('Edit'),
'route_name' => 'aggregator.feed_configure',
'route_name' => 'entity.aggregator_feed.edit_form',
'route_parameters' => array('aggregator_feed' => $feed->id()),
);
$links['delete'] = array(
'title' => $this->t('Delete'),
'route_name' => 'aggregator.feed_delete',
'route_name' => 'entity.aggregator_feed.delete_form',
'route_parameters' => array('aggregator_feed' => $feed->id()),
);
$links['delete_items'] = array(
......@@ -229,7 +229,7 @@ public function sources() {
->viewMultiple($items, 'summary');
}
}
$feed->url = $this->url('aggregator.feed_view', array('aggregator_feed' => $feed->id()));
$feed->url = $this->url('entity.aggregator_feed.canonical', array('aggregator_feed' => $feed->id()));
$build[$feed->id()] = array(
'#theme' => 'aggregator_summary_items',
'#summary_items' => $summary_items,
......
......@@ -31,9 +31,9 @@
* }
* },
* links = {
* "canonical" = "aggregator.feed_view",
* "edit-form" = "aggregator.feed_configure",
* "delete-form" = "aggregator.feed_delete",
* "canonical" = "entity.aggregator_feed.canonical",
* "edit-form" = "entity.aggregator_feed.edit_form",
* "delete-form" = "entity.aggregator_feed.delete_form",
* },
* base_table = "aggregator_feed",
* fieldable = TRUE,
......
......@@ -49,7 +49,7 @@ public function getAggregatorAdminRoutes() {
*/
public function testAggregatorSourceLocalTasks($route) {
$this->assertLocalTasks($route, array(
0 => array('aggregator.feed_view', 'aggregator.feed_configure'),
0 => array('entity.aggregator_feed.canonical', 'entity.aggregator_feed.edit_form'),
));
;
}
......@@ -59,8 +59,8 @@ public function testAggregatorSourceLocalTasks($route) {
*/
public function getAggregatorSourceRoutes() {
return array(
array('aggregator.feed_view'),
array('aggregator.feed_configure'),
array('entity.aggregator_feed.canonical'),
array('entity.aggregator_feed.edit_form'),
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment