class TimelineText in Views TimelineJS integration 7.3
Defines a TimelineJS3 text object.
Hierarchy
- class \TimelineText implements TimelineTextInterface
Expanded class hierarchy of TimelineText
File
- src/
TimelineText.php, line 6
View source
class TimelineText implements TimelineTextInterface {
/**
* The text object headline.
*
* @var string
*/
protected $headline;
/**
* The text object text.
*
* Yes, this property's name is terribly ambiguous.
*
* @var string
*/
protected $text;
public function __construct($headline = '', $text = '') {
$this->headline = $headline;
$this->text = $text;
}
public function buildArray() {
$text = array();
if (!empty($this->headline)) {
$text['headline'] = $this->headline;
}
if (!empty($this->text)) {
$text['text'] = $this->text;
}
return $text;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TimelineText:: |
protected | property | The text object headline. | |
TimelineText:: |
protected | property | The text object text. | |
TimelineText:: |
public | function |
Creates an array representing the TimelineJS javascript object. Overrides TimelineObjectInterface:: |
|
TimelineText:: |
public | function |