Compare commits

1 Commits

Author SHA1 Message Date
NH Gooi
54677c8372 Model changes voor nieuwe API 2024-09-12 15:33:53 +02:00
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,11 +19,12 @@ class NewsItem extends Model {
public $category;
public $theme;
public $region;
public $tags;
public $podcast;
public $images;
public $video;
public $url;
public $metadata;
@@ -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);