32 parent::__construct(
'ApiHelp' );
36 if ( empty( $par ) ) {
45 'submodules' => $request->getCheck(
'submodules' ),
46 'recursivesubmodules' => $request->getCheck(
'recursivesubmodules' ),
47 'title' => $request->getVal(
'title', $this->
getPageTitle(
'$1' )->getPrefixedText() ),
53 if ( substr( $par, 0, 4 ) ===
'sub/' ) {
54 $par = substr( $par, 4 );
55 $options[
'submodules'] = 1;
59 if ( substr( $par, 0, 5 ) ===
'rsub/' ) {
60 $par = substr( $par, 5 );
61 $options[
'recursivesubmodules'] = 1;
70 unset( $options[
'nolead'], $options[
'title'] );
72 $options[
'modules'] = $moduleName;
81 $module = $main->getModuleFromPath( $moduleName );
83 $this->
getOutput()->addHTML( Html::rawElement(
'span', [
'class' =>
'error' ],
85 $this->
msg(
'apihelp-no-such-module', $moduleName )->inContentLanguage()->parse()
wfExpandUrl( $url, $defaultProto=PROTO_CURRENT)
Expand a potentially local URL to a fully-qualified URL.
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...
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.
Special page to redirect to API help pages, for situations where linking to the api....
execute( $par)
Default execute method Checks user permissions.
isIncludable()
Whether it's allowed to transclude the special page via {{Special:Foo/params}}.
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.