TimelineBackground.php in Views TimelineJS integration 7.3
File
src/TimelineBackground.php
View source
<?php
class TimelineBackground implements TimelineBackgroundInterface {
protected $url;
protected $color;
public function __construct($url = '', $color = '') {
$this->url = $url;
$this->color = $color;
}
public function buildArray() {
$background = array();
if (!empty($this->url)) {
$background['url'] = $this->url;
}
if (!empty($this->color)) {
$background['color'] = $this->color;
}
return $background;
}
}