/**
  * Look up sitelinks for the given title on the repository and add them
  * to the ParserOutput object, taking into account any applicable
  * configuration and any use of the {{#noexternallanglinks}} function on the page.
  *
  * The language links are not sorted, call sortLanguageLinks() to do that.
  *
  * @since 0.4
  *
  * @param Title $title The page's title
  * @param ParserOutput $out Parsed representation of the page
  */
 public function addLinksFromRepository(Title $title, ParserOutput $out)
 {
     $repoLinks = $this->getEffectiveRepoLinks($title, $out);
     $this->addLinksToOutput($repoLinks, $out);
     $repoLinksByInterwiki = $this->indexLinksByInterwiki($repoLinks);
     $this->badgeDisplay->attachBadgesToOutput($repoLinksByInterwiki, $out);
 }
 /**
  * Add badges to the language links.
  *
  * @param array &$languageLink
  * @param Title $languageLinkTitle
  * @param Title $title
  * @param OutputPage|null $output
  *
  * @return bool
  */
 public function doSkinTemplateGetLanguageLink(array &$languageLink, Title $languageLinkTitle, Title $title, OutputPage $output = null)
 {
     if (!$output) {
         // This would happen for versions of core that do not have change Ic479e2fa5cc applied.
         wfWarn(__METHOD__ . ': SkinTemplateGetLanguageLink hook called without OutputPage object!');
         return true;
     }
     $this->badgeDisplay->applyBadges($languageLink, $languageLinkTitle, $output);
     return true;
 }