Plaatje toegevoegd aan podcast
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user