Agenda toegevoegd (/agenda/overzicht/{week,maand,alles} en /agenda/details/:id)

This commit is contained in:
2017-06-08 08:40:07 +02:00
parent 9fe4d895b3
commit 5ea381a009
10 changed files with 1138 additions and 38 deletions

View File

@@ -2,33 +2,8 @@
namespace Model;
class NewsSource {
public $title;
public $url;
public $show;
public function __construct($title, $url, $show) {
$this->title = $title;
$this->url = $url;
$this->show = $show;
}
}
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;
}
}
}
require "NewsImage.php";
require "NewsSource.php";
class NewsItem extends Model {
public $id;