/** * Tries to normalize the given page title against the given client site. * Updates $title accordingly and adds the normalization to the API output. * * @param string &$title * @param Site $site */ public function normalizeTitle(&$title, Site $site) { $normalizedTitle = $site->normalizePageName($title); if ($normalizedTitle !== false && $normalizedTitle !== $title) { // @todo this should not be in the helper but in the module itself... $this->resultBuilder->addNormalizedTitle($title, $normalizedTitle); //XXX: the below is an ugly hack as we pass title by reference... $title = $normalizedTitle; } }