Skip to content

Commit

Permalink
fix: revert last commit + put enable action as first action in the list
Browse files Browse the repository at this point in the history
  • Loading branch information
Nakahiru committed Oct 17, 2024
1 parent 8c19671 commit 37f396f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/Adapter/Module/AdminModuleDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ class AdminModuleDataProvider implements ModuleInterface
* @var array<string> 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,
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 37f396f

Please sign in to comment.