24 namespace MediaWiki\Specials;
50 parent::__construct(
'ApiHelp' );
51 $this->urlUtils = $urlUtils;
55 if ( empty( $par ) ) {
64 'submodules' => $request->getCheck(
'submodules' ),
65 'recursivesubmodules' => $request->getCheck(
'recursivesubmodules' ),
66 'title' => $request->getVal(
'title', $this->
getPageTitle(
'$1' )->getPrefixedText() ),
72 if ( str_starts_with( $par,
'sub/' ) ) {
73 $par = substr( $par, 4 );
74 $options[
'submodules'] = 1;
78 if ( str_starts_with( $par,
'rsub/' ) ) {
79 $par = substr( $par, 5 );
80 $options[
'recursivesubmodules'] = 1;
89 unset( $options[
'nolead'], $options[
'title'] );
91 $options[
'modules'] = $moduleName;
100 $module = $main->getModuleFromPath( $moduleName );
104 $this->
msg(
'apihelp-no-such-module', $moduleName )->inContentLanguage()->parse()
120 class_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 path to a specified script file, respecting file extensions; this is a wrapper around $wgScri...
Class to output help for an API module.
static getHelp(IContextSource $context, $modules, array $options)
Generate help for the specified modules.
This is the main API class, used for both external and internal processing.
Exception used to abort API execution with an error.
getOutput()
Get the OutputPage being used for this instance.
getContext()
Gets the context this SpecialPage is executed in.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getRequest()
Get the WebRequest being used for this instance.
getPageTitle( $subpage=false)
Get a self-referential title object.
including( $x=null)
Whether the special page is being evaluated via transclusion.
Shortcut to construct a special page which is unlisted by default.