Debian Codegraph @

includes/Output/Hook/OutputPageBodyAttributesHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Output\Hook;
4
5 use MediaWiki\Output\OutputPage;
6 use Skin;
7
8 /**
9 * This is a hook handler interface, see docs/Hooks.md.
10 * Use the hook name "OutputPageBodyAttributes" to register handlers implementing this interface.
11 *
12 * @stable to implement
13 * @ingroup Hooks
14 */
15 interface OutputPageBodyAttributesHook {
16 /**
17 * This hook is called when OutputPage::headElement is creating the
18 * body tag to allow for extensions to add attributes to the body of the page they
19 * might need. Or to allow building extensions to add body classes that aren't of
20 * high enough demand to be included in core.
21 *
22 * @since 1.35
23 *
24 * @param OutputPage $out OutputPage which called the hook, can be used to get the real title
25 * @param Skin $sk Skin that called OutputPage::headElement
26 * @param string[] &$bodyAttrs Array of attributes for the body tag passed to Html::openElement
27 * @return void This hook must not abort, it must return no value
28 */
29 public function onOutputPageBodyAttributes( $out, $sk, &$bodyAttrs ): void;
30 }
31
32 /** @deprecated class alias since 1.42 */
33 class_alias( OutputPageBodyAttributesHook::class, 'MediaWiki\Hook\OutputPageBodyAttributesHook' );