/** * Return a wiki page value that can be used for displaying this * property, or null if no such wiki page exists (for predefined * properties without any label). * @return SMWWikiPageValue or null */ public function getWikiPageValue() { if (isset($this->m_wikipage)) { return $this->m_wikipage; } $diWikiPage = $this->m_dataitem->getCanonicalDiWikiPage(); if ($diWikiPage !== null) { $this->m_wikipage = DataValueFactory::getInstance()->newDataValueByItem($diWikiPage, null, $this->m_caption); $this->m_wikipage->setOutputFormat($this->m_outformat); $this->m_wikipage->setLinkAttributes($this->linkAttributes); $this->m_wikipage->setOptions($this->getOptions()); $this->addError($this->m_wikipage->getErrors()); } else { // should rarely happen ($value is only changed if the input $value really was a label for a predefined prop) $this->m_wikipage = null; } return $this->m_wikipage; }