public function getData($field)
{
if ($this->data === null) {
$this->data = new \ArticleData($this->type, $this->number, $this->getLanguageId());
}
if ($field == null) {
return $this->data;
}
if (is_array($this->data)) {
return array_key_exists($field, $this->data) ? $this->data[$field] : null;
} else {
return $this->data->getFieldValue($field);
}
}