49 parent::__construct(
'ApiHelp' );
50 $this->urlUtils = $urlUtils;
63 'submodules' => $request->getCheck(
'submodules' ),
64 'recursivesubmodules' => $request->getCheck(
'recursivesubmodules' ),
65 'title' => $request->getVal(
'title', $this->
getPageTitle(
'$1' )->getPrefixedText() ),
71 if ( str_starts_with( $par,
'sub/' ) ) {
72 $par = substr( $par, 4 );
73 $options[
'submodules'] = 1;
77 if ( str_starts_with( $par,
'rsub/' ) ) {
78 $par = substr( $par, 5 );
79 $options[
'recursivesubmodules'] = 1;
88 unset( $options[
'nolead'], $options[
'title'] );
90 $options[
'modules'] = $moduleName;
99 $module = $main->getModuleFromPath( $moduleName );
101 $this->
getOutput()->addHTML( Html::rawElement(
'span', [
'class' =>
'error' ],
103 $this->
msg(
'apihelp-no-such-module', $moduleName )->inContentLanguage()->parse()
119class_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.
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.
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.