MediaWiki  master
BaseTemplate.php
Go to the documentation of this file.
1 <?php
26 abstract class BaseTemplate extends QuickTemplate {
27 
34  public function getMsg( $name ) {
35  return $this->getSkin()->msg( $name );
36  }
37 
38  function msg( $str ) {
39  echo $this->getMsg( $str )->escaped();
40  }
41 
42  function msgHtml( $str ) {
43  echo $this->getMsg( $str )->text();
44  }
45 
46  function msgWiki( $str ) {
47  echo $this->getMsg( $str )->parseAsBlock();
48  }
49 
57  function getToolbox() {
58 
59  $toolbox = [];
60  if ( isset( $this->data['nav_urls']['whatlinkshere'] )
61  && $this->data['nav_urls']['whatlinkshere']
62  ) {
63  $toolbox['whatlinkshere'] = $this->data['nav_urls']['whatlinkshere'];
64  $toolbox['whatlinkshere']['id'] = 't-whatlinkshere';
65  }
66  if ( isset( $this->data['nav_urls']['recentchangeslinked'] )
67  && $this->data['nav_urls']['recentchangeslinked']
68  ) {
69  $toolbox['recentchangeslinked'] = $this->data['nav_urls']['recentchangeslinked'];
70  $toolbox['recentchangeslinked']['msg'] = 'recentchangeslinked-toolbox';
71  $toolbox['recentchangeslinked']['id'] = 't-recentchangeslinked';
72  }
73  if ( isset( $this->data['feeds'] ) && $this->data['feeds'] ) {
74  $toolbox['feeds']['id'] = 'feedlinks';
75  $toolbox['feeds']['links'] = [];
76  foreach ( $this->data['feeds'] as $key => $feed ) {
77  $toolbox['feeds']['links'][$key] = $feed;
78  $toolbox['feeds']['links'][$key]['id'] = "feed-$key";
79  $toolbox['feeds']['links'][$key]['rel'] = 'alternate';
80  $toolbox['feeds']['links'][$key]['type'] = "application/{$key}+xml";
81  $toolbox['feeds']['links'][$key]['class'] = 'feedlink';
82  }
83  }
84  foreach ( [ 'contributions', 'log', 'blockip', 'emailuser',
85  'userrights', 'upload', 'specialpages' ] as $special
86  ) {
87  if ( isset( $this->data['nav_urls'][$special] ) && $this->data['nav_urls'][$special] ) {
88  $toolbox[$special] = $this->data['nav_urls'][$special];
89  $toolbox[$special]['id'] = "t-$special";
90  }
91  }
92  if ( isset( $this->data['nav_urls']['print'] ) && $this->data['nav_urls']['print'] ) {
93  $toolbox['print'] = $this->data['nav_urls']['print'];
94  $toolbox['print']['id'] = 't-print';
95  $toolbox['print']['rel'] = 'alternate';
96  $toolbox['print']['msg'] = 'printableversion';
97  }
98  if ( isset( $this->data['nav_urls']['permalink'] ) && $this->data['nav_urls']['permalink'] ) {
99  $toolbox['permalink'] = $this->data['nav_urls']['permalink'];
100  if ( $toolbox['permalink']['href'] === '' ) {
101  unset( $toolbox['permalink']['href'] );
102  $toolbox['ispermalink']['tooltiponly'] = true;
103  $toolbox['ispermalink']['id'] = 't-ispermalink';
104  $toolbox['ispermalink']['msg'] = 'permalink';
105  } else {
106  $toolbox['permalink']['id'] = 't-permalink';
107  }
108  }
109  if ( isset( $this->data['nav_urls']['info'] ) && $this->data['nav_urls']['info'] ) {
110  $toolbox['info'] = $this->data['nav_urls']['info'];
111  $toolbox['info']['id'] = 't-info';
112  }
113 
114  Hooks::run( 'BaseTemplateToolbox', [ &$this, &$toolbox ] );
115  return $toolbox;
116  }
117 
128  function getPersonalTools() {
129  $personal_tools = [];
130  foreach ( $this->get( 'personal_urls' ) as $key => $plink ) {
131  # The class on a personal_urls item is meant to go on the <a> instead
132  # of the <li> so we have to use a single item "links" array instead
133  # of using most of the personal_url's keys directly.
134  $ptool = [
135  'links' => [
136  [ 'single-id' => "pt-$key" ],
137  ],
138  'id' => "pt-$key",
139  ];
140  if ( isset( $plink['active'] ) ) {
141  $ptool['active'] = $plink['active'];
142  }
143  foreach ( [ 'href', 'class', 'text', 'dir', 'data' ] as $k ) {
144  if ( isset( $plink[$k] ) ) {
145  $ptool['links'][0][$k] = $plink[$k];
146  }
147  }
148  $personal_tools[$key] = $ptool;
149  }
150  return $personal_tools;
151  }
152 
153  function getSidebar( $options = [] ) {
154  // Force the rendering of the following portals
155  $sidebar = $this->data['sidebar'];
156  if ( !isset( $sidebar['SEARCH'] ) ) {
157  $sidebar['SEARCH'] = true;
158  }
159  if ( !isset( $sidebar['TOOLBOX'] ) ) {
160  $sidebar['TOOLBOX'] = true;
161  }
162  if ( !isset( $sidebar['LANGUAGES'] ) ) {
163  $sidebar['LANGUAGES'] = true;
164  }
165 
166  if ( !isset( $options['search'] ) || $options['search'] !== true ) {
167  unset( $sidebar['SEARCH'] );
168  }
169  if ( isset( $options['toolbox'] ) && $options['toolbox'] === false ) {
170  unset( $sidebar['TOOLBOX'] );
171  }
172  if ( isset( $options['languages'] ) && $options['languages'] === false ) {
173  unset( $sidebar['LANGUAGES'] );
174  }
175 
176  $boxes = [];
177  foreach ( $sidebar as $boxName => $content ) {
178  if ( $content === false ) {
179  continue;
180  }
181  switch ( $boxName ) {
182  case 'SEARCH':
183  // Search is a special case, skins should custom implement this
184  $boxes[$boxName] = [
185  'id' => 'p-search',
186  'header' => $this->getMsg( 'search' )->text(),
187  'generated' => false,
188  'content' => true,
189  ];
190  break;
191  case 'TOOLBOX':
192  $msgObj = $this->getMsg( 'toolbox' );
193  $boxes[$boxName] = [
194  'id' => 'p-tb',
195  'header' => $msgObj->exists() ? $msgObj->text() : 'toolbox',
196  'generated' => false,
197  'content' => $this->getToolbox(),
198  ];
199  break;
200  case 'LANGUAGES':
201  if ( $this->data['language_urls'] ) {
202  $msgObj = $this->getMsg( 'otherlanguages' );
203  $boxes[$boxName] = [
204  'id' => 'p-lang',
205  'header' => $msgObj->exists() ? $msgObj->text() : 'otherlanguages',
206  'generated' => false,
207  'content' => $this->data['language_urls'],
208  ];
209  }
210  break;
211  default:
212  $msgObj = $this->getMsg( $boxName );
213  $boxes[$boxName] = [
214  'id' => "p-$boxName",
215  'header' => $msgObj->exists() ? $msgObj->text() : $boxName,
216  'generated' => true,
217  'content' => $content,
218  ];
219  break;
220  }
221  }
222 
223  // HACK: Compatibility with extensions still using SkinTemplateToolboxEnd
224  $hookContents = null;
225  if ( isset( $boxes['TOOLBOX'] ) ) {
226  ob_start();
227  // We pass an extra 'true' at the end so extensions using BaseTemplateToolbox
228  // can abort and avoid outputting double toolbox links
229  Hooks::run( 'SkinTemplateToolboxEnd', [ &$this, true ] );
230  $hookContents = ob_get_contents();
231  ob_end_clean();
232  if ( !trim( $hookContents ) ) {
233  $hookContents = null;
234  }
235  }
236  // END hack
237 
238  if ( isset( $options['htmlOnly'] ) && $options['htmlOnly'] === true ) {
239  foreach ( $boxes as $boxName => $box ) {
240  if ( is_array( $box['content'] ) ) {
241  $content = '<ul>';
242  foreach ( $box['content'] as $key => $val ) {
243  $content .= "\n " . $this->makeListItem( $key, $val );
244  }
245  // HACK, shove the toolbox end onto the toolbox if we're rendering itself
246  if ( $hookContents ) {
247  $content .= "\n $hookContents";
248  }
249  // END hack
250  $content .= "\n</ul>\n";
251  $boxes[$boxName]['content'] = $content;
252  }
253  }
254  } else {
255  if ( $hookContents ) {
256  $boxes['TOOLBOXEND'] = [
257  'id' => 'p-toolboxend',
258  'header' => $boxes['TOOLBOX']['header'],
259  'generated' => false,
260  'content' => "<ul>{$hookContents}</ul>",
261  ];
262  // HACK: Make sure that TOOLBOXEND is sorted next to TOOLBOX
263  $boxes2 = [];
264  foreach ( $boxes as $key => $box ) {
265  if ( $key === 'TOOLBOXEND' ) {
266  continue;
267  }
268  $boxes2[$key] = $box;
269  if ( $key === 'TOOLBOX' ) {
270  $boxes2['TOOLBOXEND'] = $boxes['TOOLBOXEND'];
271  }
272  }
273  $boxes = $boxes2;
274  // END hack
275  }
276  }
277 
278  return $boxes;
279  }
280 
284  protected function renderAfterPortlet( $name ) {
285  $content = '';
286  Hooks::run( 'BaseTemplateAfterPortlet', [ $this, $name, &$content ] );
287 
288  if ( $content !== '' ) {
289  echo "<div class='after-portlet after-portlet-$name'>$content</div>";
290  }
291 
292  }
293 
346  function makeLink( $key, $item, $options = [] ) {
347  if ( isset( $item['text'] ) ) {
348  $text = $item['text'];
349  } else {
350  $text = $this->translator->translate( isset( $item['msg'] ) ? $item['msg'] : $key );
351  }
352 
353  $html = htmlspecialchars( $text );
354 
355  if ( isset( $options['text-wrapper'] ) ) {
356  $wrapper = $options['text-wrapper'];
357  if ( isset( $wrapper['tag'] ) ) {
358  $wrapper = [ $wrapper ];
359  }
360  while ( count( $wrapper ) > 0 ) {
361  $element = array_pop( $wrapper );
362  $html = Html::rawElement( $element['tag'], isset( $element['attributes'] )
363  ? $element['attributes']
364  : null, $html );
365  }
366  }
367 
368  if ( isset( $item['href'] ) || isset( $options['link-fallback'] ) ) {
369  $attrs = $item;
370  foreach ( [ 'single-id', 'text', 'msg', 'tooltiponly', 'context', 'primary',
371  'tooltip-params' ] as $k ) {
372  unset( $attrs[$k] );
373  }
374 
375  if ( isset( $attrs['data'] ) ) {
376  foreach ( $attrs['data'] as $key => $value ) {
377  $attrs[ 'data-' . $key ] = $value;
378  }
379  unset( $attrs[ 'data' ] );
380  }
381 
382  if ( isset( $item['id'] ) && !isset( $item['single-id'] ) ) {
383  $item['single-id'] = $item['id'];
384  }
385 
386  $tooltipParams = [];
387  if ( isset( $item['tooltip-params'] ) ) {
388  $tooltipParams = $item['tooltip-params'];
389  }
390 
391  if ( isset( $item['single-id'] ) ) {
392  if ( isset( $item['tooltiponly'] ) && $item['tooltiponly'] ) {
393  $title = Linker::titleAttrib( $item['single-id'], null, $tooltipParams );
394  if ( $title !== false ) {
395  $attrs['title'] = $title;
396  }
397  } else {
398  $tip = Linker::tooltipAndAccesskeyAttribs( $item['single-id'], $tooltipParams );
399  if ( isset( $tip['title'] ) && $tip['title'] !== false ) {
400  $attrs['title'] = $tip['title'];
401  }
402  if ( isset( $tip['accesskey'] ) && $tip['accesskey'] !== false ) {
403  $attrs['accesskey'] = $tip['accesskey'];
404  }
405  }
406  }
407  if ( isset( $options['link-class'] ) ) {
408  if ( isset( $attrs['class'] ) ) {
409  $attrs['class'] .= " {$options['link-class']}";
410  } else {
411  $attrs['class'] = $options['link-class'];
412  }
413  }
414  $html = Html::rawElement( isset( $attrs['href'] )
415  ? 'a'
416  : $options['link-fallback'], $attrs, $html );
417  }
418 
419  return $html;
420  }
421 
451  function makeListItem( $key, $item, $options = [] ) {
452  if ( isset( $item['links'] ) ) {
453  $links = [];
454  foreach ( $item['links'] as $linkKey => $link ) {
455  $links[] = $this->makeLink( $linkKey, $link, $options );
456  }
457  $html = implode( ' ', $links );
458  } else {
459  $link = $item;
460  // These keys are used by makeListItem and shouldn't be passed on to the link
461  foreach ( [ 'id', 'class', 'active', 'tag', 'itemtitle' ] as $k ) {
462  unset( $link[$k] );
463  }
464  if ( isset( $item['id'] ) && !isset( $item['single-id'] ) ) {
465  // The id goes on the <li> not on the <a> for single links
466  // but makeSidebarLink still needs to know what id to use when
467  // generating tooltips and accesskeys.
468  $link['single-id'] = $item['id'];
469  }
470  if ( isset( $link['link-class'] ) ) {
471  // link-class should be set on the <a> itself,
472  // so pass it in as 'class'
473  $link['class'] = $link['link-class'];
474  unset( $link['link-class'] );
475  }
476  $html = $this->makeLink( $key, $link, $options );
477  }
478 
479  $attrs = [];
480  foreach ( [ 'id', 'class' ] as $attr ) {
481  if ( isset( $item[$attr] ) ) {
482  $attrs[$attr] = $item[$attr];
483  }
484  }
485  if ( isset( $item['active'] ) && $item['active'] ) {
486  if ( !isset( $attrs['class'] ) ) {
487  $attrs['class'] = '';
488  }
489  $attrs['class'] .= ' active';
490  $attrs['class'] = trim( $attrs['class'] );
491  }
492  if ( isset( $item['itemtitle'] ) ) {
493  $attrs['title'] = $item['itemtitle'];
494  }
495  return Html::rawElement( isset( $options['tag'] ) ? $options['tag'] : 'li', $attrs, $html );
496  }
497 
498  function makeSearchInput( $attrs = [] ) {
499  $realAttrs = [
500  'type' => 'search',
501  'name' => 'search',
502  'placeholder' => wfMessage( 'searchsuggest-search' )->text(),
503  'value' => $this->get( 'search', '' ),
504  ];
505  $realAttrs = array_merge( $realAttrs, Linker::tooltipAndAccesskeyAttribs( 'search' ), $attrs );
506  return Html::element( 'input', $realAttrs );
507  }
508 
509  function makeSearchButton( $mode, $attrs = [] ) {
510  switch ( $mode ) {
511  case 'go':
512  case 'fulltext':
513  $realAttrs = [
514  'type' => 'submit',
515  'name' => $mode,
516  'value' => $this->translator->translate(
517  $mode == 'go' ? 'searcharticle' : 'searchbutton' ),
518  ];
519  $realAttrs = array_merge(
520  $realAttrs,
521  Linker::tooltipAndAccesskeyAttribs( "search-$mode" ),
522  $attrs
523  );
524  return Html::element( 'input', $realAttrs );
525  case 'image':
526  $buttonAttrs = [
527  'type' => 'submit',
528  'name' => 'button',
529  ];
530  $buttonAttrs = array_merge(
531  $buttonAttrs,
532  Linker::tooltipAndAccesskeyAttribs( 'search-fulltext' ),
533  $attrs
534  );
535  unset( $buttonAttrs['src'] );
536  unset( $buttonAttrs['alt'] );
537  unset( $buttonAttrs['width'] );
538  unset( $buttonAttrs['height'] );
539  $imgAttrs = [
540  'src' => $attrs['src'],
541  'alt' => isset( $attrs['alt'] )
542  ? $attrs['alt']
543  : $this->translator->translate( 'searchbutton' ),
544  'width' => isset( $attrs['width'] ) ? $attrs['width'] : null,
545  'height' => isset( $attrs['height'] ) ? $attrs['height'] : null,
546  ];
547  return Html::rawElement( 'button', $buttonAttrs, Html::element( 'img', $imgAttrs ) );
548  default:
549  throw new MWException( 'Unknown mode passed to BaseTemplate::makeSearchButton' );
550  }
551  }
552 
562  function getFooterLinks( $option = null ) {
563  $footerlinks = $this->get( 'footerlinks' );
564 
565  // Reduce footer links down to only those which are being used
566  $validFooterLinks = [];
567  foreach ( $footerlinks as $category => $links ) {
568  $validFooterLinks[$category] = [];
569  foreach ( $links as $link ) {
570  if ( isset( $this->data[$link] ) && $this->data[$link] ) {
571  $validFooterLinks[$category][] = $link;
572  }
573  }
574  if ( count( $validFooterLinks[$category] ) <= 0 ) {
575  unset( $validFooterLinks[$category] );
576  }
577  }
578 
579  if ( $option == 'flat' ) {
580  // fold footerlinks into a single array using a bit of trickery
581  $validFooterLinks = call_user_func_array(
582  'array_merge',
583  array_values( $validFooterLinks )
584  );
585  }
586 
587  return $validFooterLinks;
588  }
589 
602  function getFooterIcons( $option = null ) {
603  // Generate additional footer icons
604  $footericons = $this->get( 'footericons' );
605 
606  if ( $option == 'icononly' ) {
607  // Unset any icons which don't have an image
608  foreach ( $footericons as &$footerIconsBlock ) {
609  foreach ( $footerIconsBlock as $footerIconKey => $footerIcon ) {
610  if ( !is_string( $footerIcon ) && !isset( $footerIcon['src'] ) ) {
611  unset( $footerIconsBlock[$footerIconKey] );
612  }
613  }
614  }
615  // Redo removal of any empty blocks
616  foreach ( $footericons as $footerIconsKey => &$footerIconsBlock ) {
617  if ( count( $footerIconsBlock ) <= 0 ) {
618  unset( $footericons[$footerIconsKey] );
619  }
620  }
621  } elseif ( $option == 'nocopyright' ) {
622  unset( $footericons['copyright']['copyright'] );
623  if ( count( $footericons['copyright'] ) <= 0 ) {
624  unset( $footericons['copyright'] );
625  }
626  }
627 
628  return $footericons;
629  }
630 
646  public function getIndicators() {
647  $out = "<div class=\"mw-indicators\">\n";
648  foreach ( $this->data['indicators'] as $id => $content ) {
650  'div',
651  [
652  'id' => Sanitizer::escapeId( "mw-indicator-$id" ),
653  'class' => 'mw-indicator',
654  ],
655  $content
656  ) . "\n";
657  }
658  $out .= "</div>\n";
659  return $out;
660  }
661 
667  function printTrail() {
668 ?>
669 <?php echo MWDebug::getDebugHTML( $this->getSkin()->getContext() ); ?>
670 <?php $this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?>
671 <?php $this->html( 'reporttime' ) ?>
672 <?php
673  }
674 }
this hook is for auditing only RecentChangesLinked and Watchlist $special
Definition: hooks.txt:981
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
Definition: hooks.txt:1816
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output $out
Definition: hooks.txt:776
makeListItem($key, $item, $options=[])
Generates a list item for a navigation, portlet, portal, sidebar...
getPersonalTools()
Create an array of personal tools items from the data in the quicktemplate stored by SkinTemplate...
Generic wrapper for template functions, with interface compatible with what we use of PHPTAL 0...
static rawElement($element, $attribs=[], $contents= '')
Returns an HTML element in a string.
Definition: Html.php:210
makeLink($key, $item, $options=[])
Makes a link, usually used by makeListItem to generate a link for an item in a list used in navigatio...
New base template for a skin's template extended from QuickTemplate this class features helper method...
$value
and how to run hooks for an and one after Each event has a preferably in CamelCase For ArticleDelete hook A clump of code and data that should be run when an event happens This can be either a function and a chunk of data
Definition: hooks.txt:6
makeSearchButton($mode, $attrs=[])
getToolbox()
Create an array of common toolbox items from the data in the quicktemplate stored by SkinTemplate...
static tooltipAndAccesskeyAttribs($name, array $msgParams=[])
Returns the attributes for the tooltip and access key.
Definition: Linker.php:2240
getFooterIcons($option=null)
Returns an array of footer icons filtered down by options relevant to how the skin wishes to display ...
the value to return A Title object or null for latest to be modified or replaced by the hook handler or if authentication is not possible after cache objects are set for highlighting & $link
Definition: hooks.txt:2621
getMsg($name)
Get a Message object with its context set.
getSkin()
Get the Skin object related to this object.
static titleAttrib($name, $options=null, array $msgParams=[])
Given the id of an interface element, constructs the appropriate title attribute from the system mess...
Definition: Linker.php:2080
getIndicators()
Get the suggested HTML for page status indicators: icons (or short text snippets) usually displayed i...
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set and then return false from the hook function Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions as context called by AbstractContent::getParserOutput May be used to override the normal model specific rendering of page content as context as context $options
Definition: hooks.txt:1020
getSidebar($options=[])
MediaWiki exception.
Definition: MWException.php:26
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned after processing after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock()-offset Set to overwrite offset parameter in $wgRequest set to ''to unsetoffset-wrap String Wrap the message in html(usually something like"&lt
Allows to change the fields on the form that will be generated are created Can be used to omit specific feeds from being outputted You must not use this hook to add use OutputPage::addFeedLink() instead.&$feedLinks conditions will AND in the final query as a Content object as a Content object $title
Definition: hooks.txt:312
static run($event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
Definition: Hooks.php:131
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9
static escapeId($id, $options=[])
Given a value, escape it so that it can be used in an id attribute and return it. ...
Definition: Sanitizer.php:1169
getFooterLinks($option=null)
Returns an array of footerlinks trimmed down to only those footer links that are valid.
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:35
makeSearchInput($attrs=[])
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set and then return false from the hook function Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions as context called by AbstractContent::getParserOutput May be used to override the normal model specific rendering of page content $content
Definition: hooks.txt:1020
renderAfterPortlet($name)
static element($element, $attribs=[], $contents= '')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
Definition: Html.php:230
static getDebugHTML(IContextSource $context)
Returns the HTML to add to the page for the toolbar.
Definition: MWDebug.php:436
printTrail()
Output the basic end-page trail including bottomscripts, reporttime, and debug stuff.
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:310