getNamespace() == NS_CATEGORY ) { $optionalColon = ':'; } else { $iw = $destination->getInterwiki(); if ( $iw && Language::fetchLanguageName( $iw, null, 'mw' ) ) { $optionalColon = ':'; } } $mwRedir = MagicWord::get( 'redirect' ); $redirectText = $mwRedir->getSynonym( 0 ) . ' [[' . $optionalColon . $destination->getFullText() . ']]'; if ( $text != '' ) { $redirectText .= "\n" . $text; } $class = $this->getContentClass(); return new $class( $redirectText ); } /** * Returns true because wikitext supports redirects. * * @return bool Always true. * * @see ContentHandler::supportsRedirects */ public function supportsRedirects() { return true; } /** * Returns true because wikitext supports sections. * * @return bool Always true. * * @see ContentHandler::supportsSections */ public function supportsSections() { return true; } /** * Returns true, because wikitext supports caching using the * ParserCache mechanism. * * @since 1.21 * * @return bool Always true. * * @see ContentHandler::isParserCacheSupported */ public function isParserCacheSupported() { return true; } }