Skip to content

Commit

Permalink
changed used menu
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpapst committed Sep 17, 2024
1 parent feb01a0 commit fa8dcba
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Version 2.6.0 (unreleased)

Compatibility: requires minimum Kimai 2.15.0

- Use "main" menu instead of "Apps" menu

## Version 2.5.0

Compatibility: requires minimum Kimai 2.15.0
Expand Down
4 changes: 2 additions & 2 deletions EventSubscriber/MenuSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

final class MenuSubscriber implements EventSubscriberInterface
{
public function __construct(private AuthorizationCheckerInterface $security)
public function __construct(private readonly AuthorizationCheckerInterface $security)
{
}

Expand All @@ -37,7 +37,7 @@ public function onMenuConfigure(ConfigureMainMenuEvent $event): void
}

if ($auth->isGranted('demo')) {
$event->getAppsMenu()->addChild(
$event->getMenu()->addChild(
new MenuItemModel('demo', 'Demo', 'demo', [], 'fas fa-snowman')
);
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Showcase plugin for Kimai, with demos for many extension points within the core",
"homepage": "https://github.com/Keleo/DemoBundle",
"type": "kimai-plugin",
"version": "2.5.0",
"version": "2.6.0",
"keywords": [
"kimai",
"kimai-plugin"
Expand Down

0 comments on commit fa8dcba

Please sign in to comment.