(bug 45592) Remove unused function EchoEditFormatter::formatLink()

The logic has been moved to somewhere else

Change-Id: Icfedbc173a3a35d9f2431bfa3baf06bb63662112
This commit is contained in:
bsitu 2013-02-28 17:19:48 -08:00
parent 3e30543b8b
commit 42dbd11d7e

View file

@ -54,42 +54,4 @@ class EchoEditFormatter extends EchoBasicFormatter {
}
}
/**
* Generate links based on output format and passed properties
* $event EchoEvent
* $message Message
* $props array
*/
private function formatLink( $event, $message, $props = array() ) {
if ( !$event->getTitle() ) {
$message->params( wfMessage( 'echo-no-title' )->text() );
return;
}
$title = $event->getTitle();
$param = array();
if ( isset( $props['param'] ) ) {
$param = (array)$props['param'];
}
if ( $this->outputFormat === 'html' || $this->outputFormat === 'flyout' ) {
$class = array();
if ( isset( $props['class'] ) ) {
$class['class'] = $props['class'];
}
if ( isset( $props['linkText'] ) ) {
$linkText = $props['linkText'];
} else {
$linkText = htmlspecialchars( $title->getPrefixedText() );
}
$message->rawParams( Linker::link( $title, $linkText, $class, $param ) );
} elseif ( $this->outputFormat === 'email' ) {
$message->params( $title->getCanonicalURL( $param ) );
} else {
$message->params( $title->getFullURL( $param ) );
}
}
}