3 namespace MediaWiki\Hook
;
8 * This is a hook handler interface, see docs/Hooks.md.
9 * Use the hook name "SidebarBeforeOutput" to register handlers implementing this interface.
11 * @stable to implement
14 interface SidebarBeforeOutputHook
{
16 * Use this hook to edit the sidebar just before it is output by skins.
17 * Warning: This hook is run on each display. You should consider using
18 * 'SkinBuildSidebar', which is aggressively cached.
23 * @param array &$sidebar Sidebar content. Modify $sidebar to add or modify sidebar portlets.
24 * See {@link Skin::buildSidebar()} for the structure of $sidebar.
25 * @return void This hook must not abort; it must not return value.
27 public function onSidebarBeforeOutput( $skin, &$sidebar ): void
;