documentation-developer icon indicating copy to clipboard operation
documentation-developer copied to clipboard

IBX-10163: Document integrated help

Open dabrt opened this issue 1 month ago • 2 comments

Question Answer
JIRA Ticket IBX-10163
Versions 4.6, 5.0
Edition all

Document the integrated help LTS update

TODO: 1. Move code samples to relevant external files 2. Replace mockups with actual screenshots

Checklist

  • [x] Text renders correctly
  • [x] Text has been checked with vale
  • [x] Description metadata is up to date
  • [x] PHP code samples have been fixed with PHP CS fixer
  • [x] Added link to this PR in relevant JIRA ticket or code PR

dabrt avatar Oct 16 '25 12:10 dabrt

code_samples/ change report

Before (on target branch)After (in current PR)

code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php


code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php

docs/administration/back_office/customize_integrated_help.md@83:``` php
docs/administration/back_office/customize_integrated_help.md@84:[[= include_file('code_samples/back_office/menu/menu_item/src/EventSubscriber/HelpMenuSubscriber.php') =]]
docs/administration/back_office/customize_integrated_help.md@85:```

001⫶<?php
002⫶
003⫶declare(strict_types=1);
004⫶
005⫶namespace App\EventSubscriber;
006⫶
007⫶use Symfony\Component\EventDispatcher\EventSubscriberInterface;
008⫶use Symfony\Contracts\EventDispatcher\Event;
009⫶
010⫶final class HelpMenuSubscriber implements EventSubscriberInterface
011⫶{
012⫶ public function __construct(
013⫶ private readonly bool $kernelDebug
014⫶ ) {
015⫶ }
016⫶
017⫶ public static function getSubscribedEvents(): array
018⫶ {
019⫶ return [
020⫶ 'ibexa_integrated_help.menu_configure.help_menu' => 'onHelpMenuConfigure',
021⫶ ];
022⫶ }
023⫶
024⫶ public function onHelpMenuConfigure(Event $event): void
025⫶ {
026⫶ $menu = $event->getMenu();
027⫶
028⫶ // Remove roadmap menu item
029⫶ if ($menu->getChild('help__general')) {
030⫶ $generalSection = $menu->getChild('help__general');
031⫶ if ($generalSection->getChild('help__product_roadmap')) {
032⫶ $generalSection->removeChild('help__product_roadmap');
033⫶ }
034⫶ }
035⫶
036⫶ // Add videos tab, shown only in production
037⫶ if ($this->kernelDebug === false) {
038⫶ $resourcesSection = $menu->addChild('help__videos', [
039⫶ 'label' => 'Product videos',
040⫶ ]);
041⫶
042⫶ $resourcesSection->addChild('help__webinar_v5', [
043⫶ 'label' => 'Webinar: Introducing Ibexa DXP v5',
044⫶ 'uri' => 'https://www.youtube.com/watch?v=qWaBHG2LRm8',
045⫶ 'extras' => [
046⫶ 'isHighlighted' => false,
047⫶ 'icon' => 'https://doc.ibexa.co/en/5.0/templating/twig_function_reference/img/icons/video.svg.png',
048⫶ 'description' => 'Discover new features and improvements brought by Ibexa DXP v5.',
049⫶ ],
050⫶ ]);
051⫶ }
052⫶ }
053⫶}

Download colorized diff

github-actions[bot] avatar Oct 30 '25 14:10 github-actions[bot]