Regionieuwsmix heeft geen V-code

This commit is contained in:
2020-06-07 14:08:41 +02:00
parent 35e627209f
commit cf35296c4a

View File

@@ -15,12 +15,12 @@ class Track extends Model {
parent::__construct($data); parent::__construct($data);
parent::ConvertToDateTime($this->start); parent::ConvertToDateTime($this->start);
parent::ConvertToDateTime($this->ends); parent::ConvertToDateTime($this->ends);
$isLayout = $this->isLayout();
} }
private static $IDENTS = ['UURSLUITER' => 'Nieuws', 'NIEUWSOPEN ' => 'Nieuws', 'ANWB' => 'Verkeersinformatie', 'REGIO' => 'Regionieuws', 'CB' => 'Reclame']; private static $IDENTS = ['UURSLUITER' => 'Nieuws', 'NIEUWSOPEN ' => 'Nieuws', 'ANWB' => 'Verkeersinformatie', 'REGIO' => 'Regionieuws', 'CB' => 'Reclame'];
public function isLayout() { public function isLayout() {
if(strlen($this->itemCode) > 0 && ($this->itemCode[0] == 'V')) {
foreach(self::$IDENTS as $ident => $display) { foreach(self::$IDENTS as $ident => $display) {
if(substr($this->itemCode, 0, strlen($ident)) == $ident || substr($this->title, 0, strlen($ident)) == $ident) { if(substr($this->itemCode, 0, strlen($ident)) == $ident || substr($this->title, 0, strlen($ident)) == $ident) {
$this->title = $display; $this->title = $display;
@@ -30,6 +30,7 @@ class Track extends Model {
} }
} }
if(strlen($this->itemCode) > 0 && ($this->itemCode[0] == 'V')) {
return true; return true;
} }