From 83de3b09d27321422e441c3ca3df3839eef9a288 Mon Sep 17 00:00:00 2001 From: Serdar Cakir Date: Tue, 3 Oct 2023 10:19:11 +0300 Subject: [PATCH 1/2] add modal attr --- src/Commands/GetInteractiveMenus.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Commands/GetInteractiveMenus.php b/src/Commands/GetInteractiveMenus.php index 653db70..3f9ac89 100644 --- a/src/Commands/GetInteractiveMenus.php +++ b/src/Commands/GetInteractiveMenus.php @@ -81,6 +81,8 @@ function ($module) { 'slug' => $section['slug'], 'active' => false, 'href' => $section['attributes']['href'], + 'data-toggle' => isset($section['attributes']['data-toggle']) ? $section['attributes']['data-toggle'] : null, + 'data-target' => isset($section['attributes']['data-target']) ? $section['attributes']['data-target'] : null, ]; } From 8a3cb9e750d9d17699665c80ecab59fa8d50e335 Mon Sep 17 00:00:00 2001 From: Serdar Cakir Date: Tue, 3 Oct 2023 11:17:14 +0300 Subject: [PATCH 2/2] simplify --- src/Commands/GetInteractiveMenus.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Commands/GetInteractiveMenus.php b/src/Commands/GetInteractiveMenus.php index 3f9ac89..717e084 100644 --- a/src/Commands/GetInteractiveMenus.php +++ b/src/Commands/GetInteractiveMenus.php @@ -81,8 +81,8 @@ function ($module) { 'slug' => $section['slug'], 'active' => false, 'href' => $section['attributes']['href'], - 'data-toggle' => isset($section['attributes']['data-toggle']) ? $section['attributes']['data-toggle'] : null, - 'data-target' => isset($section['attributes']['data-target']) ? $section['attributes']['data-target'] : null, + 'data-toggle' => $section['attributes']['data-toggle'] ?? null , + 'data-target' => $section['attributes']['data-target'] ?? null, ]; }