/** * Creates the HTML for a link to this page, with some parameters set. * * @param[in] $text string The anchor text for the link * @param[in] $out bool Should the linked to page include outgoing properties? * @param[in] $in bool Should the linked to page include incoming properties? * @param[in] $offset int What is the offset for the incoming properties? * * @return string HTML with the link to this page */ private function linkHere($text, $out, $in, $offset) { $frag = $text == wfMessage('smw_browse_show_incoming')->text() ? '#smw_browse_incoming' : ''; return Html::element('a', array('href' => \SpecialPage::getSafeTitleFor('Browse')->getLocalURL(array('offset' => $offset, 'dir' => $out ? $in ? 'both' : 'out' : 'in', 'article' => $this->subject->getLongWikiText())) . $frag), $text); }