Replace Hook with EventDispatcher in Content Nav class

This commit is contained in:
Art4 2025-01-29 07:46:56 +00:00 committed by Hypolite Petovan
parent 715248d6a2
commit b9a191f6d8
5 changed files with 23 additions and 6 deletions

View file

@ -24,7 +24,7 @@ use Friendica\Event\NamedEvent;
final class HookEventBridge
{
/**
* This allows us to mock the Hook call in tests.
* @internal This allows us to mock the Hook call in tests.
*
* @var \Closure|null
*/
@ -37,8 +37,10 @@ final class HookEventBridge
Event::INIT => 'init_1',
ConfigLoadedEvent::CONFIG_LOADED => 'load_config',
ArrayFilterEvent::APP_MENU => 'app_menu',
ArrayFilterEvent::NAV_INFO => 'nav_info',
HtmlFilterEvent::HEAD => 'head',
HtmlFilterEvent::FOOTER => 'footer',
HtmlFilterEvent::PAGE_HEADER => 'page_header',
HtmlFilterEvent::PAGE_CONTENT_TOP => 'page_content_top',
HtmlFilterEvent::PAGE_END => 'page_end',
];
@ -52,8 +54,10 @@ final class HookEventBridge
Event::INIT => 'onNamedEvent',
ConfigLoadedEvent::CONFIG_LOADED => 'onConfigLoadedEvent',
ArrayFilterEvent::APP_MENU => 'onArrayFilterEvent',
ArrayFilterEvent::NAV_INFO => 'onArrayFilterEvent',
HtmlFilterEvent::HEAD => 'onHtmlFilterEvent',
HtmlFilterEvent::FOOTER => 'onHtmlFilterEvent',
HtmlFilterEvent::PAGE_HEADER => 'onHtmlFilterEvent',
HtmlFilterEvent::PAGE_CONTENT_TOP => 'onHtmlFilterEvent',
HtmlFilterEvent::PAGE_END => 'onHtmlFilterEvent',
];