Part of #2285413: [Meta] Standardize entity route names. See there for details.

CommentFileSizeAuthor
route-names-aggregator.patch5.36 KBCrell
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Status: Needs review » Reviewed & tested by the community
  1. +++ b/core/modules/aggregator/src/Controller/AggregatorController.php
    @@ -229,7 +229,7 @@ public function sources() {
    -      $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()));
    

    OT: But why do we actually need this ... can't we use $feed->uriInfo() directly somehow?

  2. +++ b/core/modules/aggregator/tests/src/Menu/AggregatorLocalTasksTest.php
    @@ -49,7 +49,7 @@ public function getAggregatorAdminRoutes() {
    +      0 => array('entity.aggregator_feed.canonical', 'entity.aggregator_feed.edit_form'),
    

    The big advantage is that it is easier to actually get the right route name. This is quite a DX win tbh.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.