Commit 588c1bff authored by Damien LAGUERRE's avatar Damien LAGUERRE
Browse files

Issue #3273513 by kensae: Link to Stats detail view for a newsletter is wrong

parent b85c2907
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -428,8 +428,12 @@ class SimplenewsStatsPage {
  }

  protected function getLinkDetail(){

    /** @var \Drupal\simplenews_stats\SimplenewsStatsTools $simplenewsStatsTools */
    $simplenewsStatsTools = \Drupal::service('simplenews_stats.tools');

    $url = Url::fromRoute('entity.simplenews_stats_item.collection',[
      'entity' => \Drupal::service('simplenews_stats.tools')->getEntityLabel($this->entity)
      'entity' => $simplenewsStatsTools->getEntityLabel($this->entity, TRUE)
    ]);
    $url->setOption('attributes',['class'=>['button']]);
    return Link::fromTextAndUrl($this->t('Detail'),$url);