<?php
namespace App\Component\AdminMenu\EventSubscriber;
use App\Component\AdminMenu\Event\AbstractBuildMenuEvent;
use App\Component\AdminMenu\Event\BuildVacancyMenuEvent;
use App\EventListener\FeatureFlagListener;
class VacancyMenuHeaderSubscriber extends AbstractMenuBuildEventSubscriber
{
protected static int $priority = 100;
protected static string $eventClass = BuildVacancyMenuEvent::class;
public function buildMenu(AbstractBuildMenuEvent $event)
{
if (!$this->checkFeatures([FeatureFlagListener::FEATURE_VACANCY])) {
$event->stopPropagation();
return;
}
$this->getMenuBuilder($event->getMenu())
->addSection('Vacancies', 'skin-aqua');
}
}