2020-03-03 22:50:34 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MediaWiki\Hook;
|
|
|
|
|
|
2020-03-16 23:31:05 +00:00
|
|
|
use OutputPage;
|
|
|
|
|
use Skin;
|
|
|
|
|
|
2020-03-03 22:50:34 +00:00
|
|
|
/**
|
2020-07-13 09:05:49 +00:00
|
|
|
* @stable to implement
|
2020-03-03 22:50:34 +00:00
|
|
|
* @ingroup Hooks
|
|
|
|
|
*/
|
|
|
|
|
interface OutputPageBodyAttributesHook {
|
|
|
|
|
/**
|
2020-03-16 23:31:05 +00:00
|
|
|
* This hook is called when OutputPage::headElement is creating the
|
2020-03-03 22:50:34 +00:00
|
|
|
* body tag to allow for extensions to add attributes to the body of the page they
|
|
|
|
|
* might need. Or to allow building extensions to add body classes that aren't of
|
|
|
|
|
* high enough demand to be included in core.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.35
|
|
|
|
|
*
|
2020-03-16 23:31:05 +00:00
|
|
|
* @param OutputPage $out OutputPage which called the hook, can be used to get the real title
|
|
|
|
|
* @param Skin $sk Skin that called OutputPage::headElement
|
2020-04-20 06:03:16 +00:00
|
|
|
* @param string[] &$bodyAttrs Array of attributes for the body tag passed to Html::openElement
|
2020-06-27 02:26:21 +00:00
|
|
|
* @return void This hook must not abort, it must return no value
|
2020-03-03 22:50:34 +00:00
|
|
|
*/
|
2020-06-27 02:26:21 +00:00
|
|
|
public function onOutputPageBodyAttributes( $out, $sk, &$bodyAttrs ): void;
|
2020-03-03 22:50:34 +00:00
|
|
|
}
|