Skip to content

Commit

Permalink
minor #6373 Reindexed ActionCollection by actionName after process (m…
Browse files Browse the repository at this point in the history
…axhelias)

This PR was merged into the 4.x branch.

Discussion
----------

Reindexed ActionCollection by actionName after process

Commits
-------

43c36dc Reindexed ActionCollection by actionName after process
  • Loading branch information
javiereguiluz committed Jul 18, 2024
2 parents 617219b + 43c36dc commit 88190e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Factory/ActionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function processEntityActions(EntityDto $entityDto, ActionConfigDto $acti
$actionDto->setCssClass($actionDto->getCssClass().' '.$addedCssClass);
}

$entityActions[] = $this->processAction($currentPage, $actionDto, $entityDto);
$entityActions[$actionDto->getName()] = $this->processAction($currentPage, $actionDto, $entityDto);
}

$entityDto->setActions(ActionCollection::new($entityActions));
Expand Down Expand Up @@ -112,7 +112,7 @@ public function processGlobalActions(?ActionConfigDto $actionsDto = null): Actio
$actionDto->setCssClass($actionDto->getCssClass().' '.$addedCssClass);
}

$globalActions[] = $this->processAction($currentPage, $actionDto);
$globalActions[$actionDto->getName()] = $this->processAction($currentPage, $actionDto);
}

return ActionCollection::new($globalActions);
Expand Down

0 comments on commit 88190e7

Please sign in to comment.