+ /**
+ * Adds help link with an icon via page indicators.
+ * @param string $to
+ * @param bool $overrideBaseUrl
+ * @since 1.25
+ */
+ public function addHelpLink( $to, $overrideBaseUrl = false ) {
+ $this->addModuleStyles( 'mediawiki.helplink' );
+ $text = $this->msg( 'helppage-top-gethelp' )->escaped();
+
+ if ( $overrideBaseUrl ) {
+ $helpUrl = $to;
+ } else {
+ $helpUrl = "//www.mediawiki.org/wiki/Special:MyLanguage/$to";
+ }
+ $link = Html::rawElement(
+ 'a',
+ array(
+ 'href' => $helpUrl,
+ 'target' => '_blank',
+ 'class' => 'mw-helplink',
+ ),
+ $text
+ );
+
+ $this->setIndicators( array( 'mw-helplink' => $link ) );
+ }
+