30 parent::__construct(
'ApiHelp' );
35 $this->
getOutput()->addModuleStyles(
'mediawiki.codex.messagebox.styles' );
45 'submodules' => $request->getCheck(
'submodules' ),
46 'recursivesubmodules' => $request->getCheck(
'recursivesubmodules' ),
47 'title' => $request->getVal(
'title', $this->
getPageTitle(
'$1' )->getPrefixedText() ),
53 if ( str_starts_with( $par,
'sub/' ) ) {
54 $par = substr( $par, 4 );
55 $options[
'submodules'] = 1;
59 if ( str_starts_with( $par,
'rsub/' ) ) {
60 $par = substr( $par, 5 );
61 $options[
'recursivesubmodules'] = 1;
68 if ( !isset( $moduleName ) ) {
69 throw new LogicException(
'Module name should have been found' );
73 unset( $options[
'nolead'], $options[
'title'] );
74 $options[
'modules'] = $moduleName;
82 $module = $main->getModuleFromPath( $moduleName );
84 $this->
getOutput()->addHTML( Html::errorBox(
85 $this->
msg(
'apihelp-no-such-module', $moduleName )->inContentLanguage()->parse()
100class_alias( SpecialApiHelp::class,
'SpecialApiHelp' );
wfAppendQuery( $url, $query)
Append a query string to an existing URL, which may or may not already have query string parameters a...
wfScript( $script='index')
Get the URL path to a MediaWiki entry point.
This is the main API class, used for both external and internal processing.
getPageTitle( $subpage=false)
Get a self-referential title object.
getContext()
Gets the context this SpecialPage is executed in.
getRequest()
Get the WebRequest being used for this instance.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.
including( $x=null)
Whether the special page is being evaluated via transclusion.
Shortcut to construct a special page which is unlisted by default.