* Constructor for OutputPage. This should not be called directly.
* Instead a new RequestContext should be created and it will implicitly create
* a OutputPage tied to that context.
+ * @param IContextSource|null $context
*/
function __construct( IContextSource $context = null ) {
if ( $context === null ) {
/**
* Set the URL to be used for the <link rel=canonical>. This should be used
* in preference to addLink(), to avoid duplicate link tags.
+ * @param string $url
*/
function setCanonicalUrl( $url ) {
$this->mCanonicalUrl = $url;
* Add a subtitle containing a backlink to a page
*
* @param Title $title Title to link to
+ * @param array $query Array of additional parameters to include in the link
*/
- public function addBacklinkSubtitle( Title $title ) {
- $query = array();
+ public function addBacklinkSubtitle( Title $title, $query = array() ) {
if ( $title->isRedirect() ) {
$query['redirect'] = 'no';
}
);
} else {
$links['html'] .= Html::inlineScript(
- ResourceLoader::makeLoaderConditionalScript(
- $resourceLoader->makeModuleResponse( $context, $grpModules )
- )
+ $resourceLoader->makeModuleResponse( $context, $grpModules )
);
}
$links['html'] .= "\n";