Exemple #1
0
 protected function setData(array $data) : bool
 {
     parent::setData($data);
     $this->title = $data['title'];
     $this->content = $data['content'];
     return true;
 }
Exemple #2
0
 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;
 }