diff --git a/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php b/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php index 81faed6518..78ae51c261 100644 --- a/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php +++ b/code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php @@ -11,13 +11,10 @@ use Ibexa\IntegratedHelp\ProductTour\ProductTourStep; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -final class NotificationScenarioSubscriber implements EventSubscriberInterface +final readonly class NotificationScenarioSubscriber implements EventSubscriberInterface { - private NotificationService $notificationService; - - public function __construct(NotificationService $notificationService) + public function __construct(private NotificationService $notificationService) { - $this->notificationService = $notificationService; } public static function getSubscribedEvents(): array diff --git a/deptrac.baseline.yaml b/deptrac.baseline.yaml index fe87eb8465..85f245e75f 100644 --- a/deptrac.baseline.yaml +++ b/deptrac.baseline.yaml @@ -131,6 +131,10 @@ deptrac: App\EventSubscriber\MyMenuSubscriber: - Ibexa\AdminUi\Menu\Event\ConfigureMenuEvent - Ibexa\AdminUi\Menu\MainMenuBuilder + App\EventSubscriber\NotificationScenarioSubscriber: + - Ibexa\IntegratedHelp\ProductTour\Block\LinkBlock + - Ibexa\IntegratedHelp\ProductTour\Block\TextBlock + - Ibexa\IntegratedHelp\ProductTour\ProductTourStep App\Event\RandomBlockListener: - Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\BlockRenderEvents - Ibexa\FieldTypePage\FieldType\Page\Block\Renderer\Event\PreRenderEvent diff --git a/docs/administration/back_office/customize_product_tour.md b/docs/administration/back_office/customize_product_tour.md index 6e90dde1e3..5ae123bf07 100644 --- a/docs/administration/back_office/customize_product_tour.md +++ b/docs/administration/back_office/customize_product_tour.md @@ -40,7 +40,7 @@ ibexa: Then, create a subscriber that modifies the scenario. -```php hl_lines="35-37 39-41 43-45 47-58" +```php hl_lines="32-34 36-38 40-42 44-55" [[= include_file('code_samples/back_office/product_tour/src/EventSubscriber/NotificationScenarioSubscriber.php') =]] ``` @@ -52,4 +52,3 @@ The subscriber executes the following actions: - adds a custom clickable step to highlight the unread notification ![Scenario built with PHP triggered on unread notification](img/product_tour/custom_scenario.png "Scenario built with PHP triggered on unread notification") -