Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / security_review / src / Checks / ViewsAccess.php
index 3d7cf0150939504e21abc2d1fa5dcb9d82e83c3c..5a28b193bf1ce72ec1dde330408c66b3d78aa566 100644 (file)
@@ -1,13 +1,8 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\security_review\Checks\ViewsAccess.
- */
-
 namespace Drupal\security_review\Checks;
 
-use Drupal\Core\Url;
+use Drupal\Core\Link;
 use Drupal\security_review\Check;
 use Drupal\security_review\CheckResult;
 use Drupal\views\Entity\View;
@@ -98,15 +93,13 @@ class ViewsAccess extends Check {
       /** @var View $view */
 
       foreach ($displays as $display) {
-        $items[] = $this->l(
+        $items[] = Link::createFromRoute(
           $view->label() . ': ' . $display,
-          Url::fromRoute(
-            'entity.view.edit_display_form',
-            [
-              'view' => $view_id,
-              'display_id' => $display,
-            ]
-          )
+          'entity.view.edit_display_form',
+          [
+            'view' => $view_id,
+            'display_id' => $display,
+          ]
         );
       }
     }