From befc297b4fdd1bcb351512f5fe5c2ad07c099e52 Mon Sep 17 00:00:00 2001
From: Marc-Oliver Teschke <25628-marcoliver@users.noreply.drupalcode.org>
Date: Fri, 2 Aug 2024 19:27:50 +0000
Subject: [PATCH] Issue #3416954: [admin_toolbar_tools] Don't add disabled
 views to the admin menu

---
 admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php b/admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php
index 006eacd..2d1d1da 100644
--- a/admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php
+++ b/admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php
@@ -587,7 +587,7 @@ class ExtraLinks extends DeriverBase implements ContainerDeriverInterface {
         'parent' => 'entity.view.collection',
         'weight' => -5,
       ] + $base_plugin_definition;
-      $views = $this->entityTypeManager->getStorage('view')->loadMultiple();
+      $views = $this->entityTypeManager->getStorage('view')->loadByProperties(['status' => TRUE]);
       foreach ($views as $view) {
         $links['views_ui.' . $view->id()] = [
           'title' => $view->label(),
-- 
GitLab