Agenda toegevoegd (/agenda/overzicht/{week,maand,alles} en /agenda/details/:id)
This commit is contained in:
19
common/classes/NewsImage.php
Normal file
19
common/classes/NewsImage.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Model;
|
||||
|
||||
class NewsImage extends Model {
|
||||
public $id;
|
||||
public $title;
|
||||
public $url;
|
||||
|
||||
public function __construct($data, $urlPrefix = '/') {
|
||||
parent::__construct($data);
|
||||
|
||||
// Deserialisatie van JSON heeft url in data,
|
||||
// lezen uit database heeft file en (als het goed is) urlPrefix
|
||||
if(isset($data->file)) {
|
||||
$this->url = $urlPrefix . $data->file;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user