class TimelineTitleSlide in Views TimelineJS integration 7.3
Defines a TimelineJS3 title slide.
Hierarchy
- class \TimelineSlide implements TimelineSlideInterface
- class \TimelineTitleSlide
Expanded class hierarchy of TimelineTitleSlide
File
- src/
TimelineTitleSlide.php, line 6
View source
class TimelineTitleSlide extends TimelineSlide {
public function __construct(TimelineTextInterface $text = NULL) {
if (!empty($text)) {
$this->text = $text;
}
}
/**
* {@inheritdoc}
*/
public function buildArray() {
$slide = array();
if (!empty($this->text)) {
$slide['text'] = $this->text
->buildArray();
}
if (!empty($this->media)) {
$slide['media'] = $this->media
->buildArray();
}
if (!empty($this->background)) {
$slide['background'] = $this->background
->buildArray();
}
if (!$this->autolink) {
$slide['autolink'] = FALSE;
}
if (!empty($this->unique_id)) {
$slide['unique_id'] = $this->unique_id;
}
// Filter any empty values before returning.
return array_filter($slide);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TimelineSlide:: |
protected | property | The slide autolink property | |
TimelineSlide:: |
protected | property | The slide background url and color. | |
TimelineSlide:: |
protected | property | The slide display date. | |
TimelineSlide:: |
protected | property | The slide end date. | |
TimelineSlide:: |
protected | property | The slide group. | |
TimelineSlide:: |
protected | property | The slide media and its metadata. | |
TimelineSlide:: |
protected | property | The slide start date. | |
TimelineSlide:: |
protected | property | The slide headline and text. | |
TimelineSlide:: |
protected | property | The slide unique id. | |
TimelineSlide:: |
public | function |
Sets the slide's autolink property to FALSE. Overrides TimelineSlideInterface:: |
|
TimelineSlide:: |
public | function |
Sets the slide's autolink property to TRUE. Overrides TimelineSlideInterface:: |
|
TimelineSlide:: |
public | function |
Sets the background for this slide. Overrides TimelineSlideInterface:: |
|
TimelineSlide:: |
public | function |
Sets the display date for this slide. Overrides TimelineSlideInterface:: |
|
TimelineSlide:: |
public | function |
Sets the group for this slide. Overrides TimelineSlideInterface:: |
|
TimelineSlide:: |
public | function |
Sets the media for this slide. Overrides TimelineSlideInterface:: |
|
TimelineSlide:: |
public | function |
Sets the unique ID for this slide. Overrides TimelineSlideInterface:: |
|
TimelineTitleSlide:: |
public | function |
Creates an array representing the TimelineJS javascript object. Overrides TimelineSlide:: |
|
TimelineTitleSlide:: |
public | function |
Overrides TimelineSlide:: |