You are here

public function TimelineText::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/TimelineText.php, line 29

Class

TimelineText
Defines a TimelineJS3 text object.

Code

public function buildArray() {
  $text = array();
  if (!empty($this->headline)) {
    $text['headline'] = $this->headline;
  }
  if (!empty($this->text)) {
    $text['text'] = $this->text;
  }
  return $text;
}