Text.php in Views TimelineJS integration 8.3
File
src/TimelineJS/Text.php
View source
<?php
namespace Drupal\views_timelinejs\TimelineJS;
class Text implements TextInterface {
protected $headline;
protected $text;
public function __construct($headline = '', $text = '') {
$this->headline = $headline;
$this->text = $text;
}
public function buildArray() {
$text = [];
if (!empty($this->headline)) {
$text['headline'] = $this->headline;
}
if (!empty($this->text)) {
$text['text'] = $this->text;
}
return $text;
}
}
Classes
Name |
Description |
Text |
Defines a TimelineJS3 text object. |