Terugluisterknopjes (nog niet werkend)

This commit is contained in:
2017-08-01 03:43:02 +02:00
parent d04baa0367
commit 9201c50812
2 changed files with 83 additions and 62 deletions

View File

@@ -7,6 +7,8 @@ class Program extends Model {
public $name;
public $description;
public $email;
public $nonstop;
public $rerun;
public $priority;
public $hosts;
@@ -20,10 +22,14 @@ class Program extends Model {
$this->name .= ' ' . $data->suffix;
}
parent::ConvertToDateTime($this->next);
if($this->recent && $this->recent) {
foreach($this->recent as &$recent) {
parent::ConvertToDateTime($recent);
parent::ConvertToDateTime($recent->start);
}
}
if($this->next && $this->next) {
foreach($this->next as &$next) {
parent::ConvertToDateTime($next->start);
}
}
@@ -31,6 +37,11 @@ class Program extends Model {
$this->email = substr($data->email, 0, $mailComma);
}
if(isset($data->state)) {
$this->nonstop = $data->state == 0;
$this->rerun = $data->state == 3;
}
$this->url = "/{$this->id}/" . parent::url_slug($this->name);
}