MediaWiki REL1_33
ReplaceTextUtils.php
Go to the documentation of this file.
1<?php
22
24
31 public static function link( Title $title, $text = null ) {
32 if ( method_exists( '\MediaWiki\MediaWikiServices', 'getLinkRenderer' ) ) {
33 $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
34 if ( class_exists( 'HtmlArmor' ) && !is_null( $text ) ) {
35 $text = new HtmlArmor( $text );
36 }
37 return $linkRenderer->makeLink( $title, $text );
38 };
39 return Linker::link( $title, $text );
40 }
41}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
Marks HTML that shouldn't be escaped.
Definition HtmlArmor.php:28
static link( $target, $html=null, $customAttribs=[], $query=[], $options=[])
This function returns an HTML link to the given target.
Definition Linker.php:84
static link(Title $title, $text=null)
Shim for compatibility.
Represents a title within MediaWiki.
Definition Title.php:40
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 after processing after in associative array form before processing starts Return false to skip default processing and return $ret $linkRenderer
Definition hooks.txt:2054