Plaatje toegevoegd aan podcast

This commit is contained in:
2019-10-22 21:37:39 +02:00
parent 2b5e21f481
commit d27de22d48
2 changed files with 12 additions and 0 deletions

View File

@@ -2,6 +2,8 @@
namespace Model;
require "NewsImage.php";
class Podcast extends Model {
public $id;
public $title;
@@ -12,6 +14,7 @@ class Podcast extends Model {
public $url;
public $auth;
public $download;
public $image;
private $key;
public function __construct($data) {
@@ -33,6 +36,14 @@ class Podcast extends Model {
$this->program = new \Model\Program(['id' => $data->program, 'name' => $data->program_name, 'description' => $data->program_description]);
}
}
if(isset($data->imagefile)) {
$imagedata = new \stdClass();
$imagedata->id = $this->id;
$imagedata->file = $data->imagefile;
$imagedata->title = $data->imagecaption;
$this->image = new NewsImage($imagedata, '/img/podcast/');
}
}
public function titleWithoutProgram() {