22 lines
507 B
PHP
22 lines
507 B
PHP
<?php
|
|
|
|
namespace KimaiPlugin\KimaiHeatmapBundle\EventSubscriber;
|
|
|
|
use App\Event\DashboardEvent;
|
|
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
|
|
|
final class DashboardSubscriber implements EventSubscriberInterface
|
|
{
|
|
|
|
public static function getSubscribedEvents(): array
|
|
{
|
|
return [
|
|
DashboardEvent::class => ['onDashboard', 100],
|
|
];
|
|
}
|
|
|
|
public function onDashboard(DashboardEvent $event): void
|
|
{
|
|
$event->addWidget('HeatmapWidget');
|
|
}
|
|
}
|