From 37f396f026c77e60be90d294fc54069b5fad51a2 Mon Sep 17 00:00:00 2001 From: Julien Gissinger Date: Thu, 17 Oct 2024 11:26:23 +0200 Subject: [PATCH] fix: revert last commit + put enable action as first action in the list --- src/Adapter/Module/AdminModuleDataProvider.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Adapter/Module/AdminModuleDataProvider.php b/src/Adapter/Module/AdminModuleDataProvider.php index 8fce62ef462f7..6b72af2839aec 100644 --- a/src/Adapter/Module/AdminModuleDataProvider.php +++ b/src/Adapter/Module/AdminModuleDataProvider.php @@ -81,9 +81,9 @@ class AdminModuleDataProvider implements ModuleInterface * @var array of defined and callable module actions */ protected $moduleActions = [ + Module::ACTION_ENABLE, Module::ACTION_INSTALL, Module::ACTION_CONFIGURE, - Module::ACTION_ENABLE, Module::ACTION_DISABLE, Module::ACTION_ENABLE_MOBILE, Module::ACTION_DISABLE_MOBILE, @@ -285,13 +285,7 @@ public function setActionUrls(ModuleCollection $modules, ?string $specific_actio if ($specific_action && array_key_exists($specific_action, $filteredUrls)) { $urlActive = $specific_action; } else { - // if there is an 'enable' action available set it as first button action - // instead of 'configure' action which is the first action in the list - if (array_key_exists('enable', $filteredUrls)) { - $urlActive = 'enable'; - } else { - $urlActive = key($filteredUrls); - } + $urlActive = key($filteredUrls); } $moduleAttributes->set('urls', $filteredUrls);