/** * @since 2.4 * * @param DataValue $dataValue * * @return Description */ public function newFromDataValue(DataValue $dataValue) { if (!$dataValue->isValid()) { return $this->newThingDescription(); } // Avoid circular reference when called from outside of the DV context $dataValue->setOption(DataValue::OPT_QUERY_CONTEXT, true); $description = $dataValue->getQueryDescription($dataValue->getWikiValue()); if ($dataValue->getProperty() === null) { return $description; } return $this->newSomeProperty($dataValue->getProperty(), $description); }