forked from EasyCorp/EasyAdminBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Impersonate from user menu dropdown EasyCorp#6524
- Loading branch information
1 parent
e7141eb
commit 0e0bd9f
Showing
15 changed files
with
399 additions
and
302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace EasyCorp\Bundle\EasyAdminBundle\Config\Menu; | ||
|
||
use EasyCorp\Bundle\EasyAdminBundle\Config\Option\EA; | ||
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Menu\MenuItemInterface; | ||
use EasyCorp\Bundle\EasyAdminBundle\Dto\MenuItemDto; | ||
use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
||
/** | ||
* @see EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem::linkToExitImpersonation() | ||
* | ||
* @author Elías Fernández <[email protected]> | ||
*/ | ||
final class AccessImpersonationMenuItem implements MenuItemInterface | ||
{ | ||
use MenuItemTrait; | ||
|
||
public function __construct(TranslatableInterface|string $label, ?string $icon) | ||
{ | ||
$this->dto = new MenuItemDto(); | ||
|
||
$this->dto->setType(MenuItemDto::TYPE_ACCESS_IMPERSONATION); | ||
$this->dto->setLabel($label); | ||
$this->dto->setIcon($icon); | ||
$this->dto->setLinkUrl('test'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/Resources/public/app.d52c6a33.css → src/Resources/public/app.f54c2204.css
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
src/Resources/public/app.3048ce28.js → src/Resources/public/app.fb2fb73c.js
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.