Merge "mediawiki.api: Remove console warning for legacy token type"
[mediawiki.git] / includes / skins / Hook / SidebarBeforeOutputHook.php
blob82994b855ce03a650320a2f0a89fd884dfaf854a
1 <?php
3 namespace MediaWiki\Hook;
5 use Skin;
7 /**
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
12 * @ingroup Hooks
14 interface SidebarBeforeOutputHook {
15 /**
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.
20 * @since 1.35
22 * @param Skin $skin
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;