protected function setData(array $data) : bool { parent::setData($data); $this->title = $data['title']; $this->content = $data['content']; return true; }
protected function setData(array $data) : bool { parent::setData($data); $this->title = $data['title']; // description is optional, but is always set $this->description = $data['description'] ?? ""; return true; }