Model changes voor nieuwe API

This commit is contained in:
NH Gooi
2024-09-12 15:33:53 +02:00
parent d859df0ab4
commit 54677c8372
2 changed files with 8 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ class CalendarEvent extends Model {
public $keywords;
public $url;
public $metadata;
public $tags;
public function __construct($data, $images = null, $podcast = null) {
parent::__construct($data);

View File

@@ -19,6 +19,7 @@ class NewsItem extends Model {
public $category;
public $theme;
public $region;
public $tags;
public $podcast;
public $images;
@@ -79,6 +80,11 @@ class NewsItem extends Model {
}
}
if(isset($data->tags)) {
foreach($data->tags as $tag) {
$this->theme = new \Model\NewsRegion($tag->titel, $tag->slug);
}
}
$images = ($images != null) ? $images
: (isset($data->images) ? $data->images : null);