public function TimelineBackground::buildArray in Views TimelineJS integration 7.3
Creates an array representing the TimelineJS javascript object.
Return value
array The formatted array.
Overrides TimelineObjectInterface::buildArray
File
- src/
TimelineBackground.php, line 32
Class
- TimelineBackground
- Defines a TimelineJS3 background object.
Code
public function buildArray() {
$background = array();
if (!empty($this->url)) {
$background['url'] = $this->url;
}
if (!empty($this->color)) {
$background['color'] = $this->color;
}
return $background;
}