You are here

public function Slide::__construct in Views TimelineJS integration 8.3

Constructs a new Slide object.

Parameters

\Drupal\views_timelinejs\TimelineJS\DateInterface $start_date: The slide's start date.

\Drupal\views_timelinejs\TimelineJS\DateInterface|null $end_date: The slide's end date.

\Drupal\views_timelinejs\TimelineJS\TextInterface|null $text: Text to display on the slide.

1 method overrides Slide::__construct()
TitleSlide::__construct in src/TimelineJS/TitleSlide.php
Constructs a new TitleSlide object.

File

src/TimelineJS/Slide.php, line 83

Class

Slide
Defines a TimelineJS3 slide.

Namespace

Drupal\views_timelinejs\TimelineJS

Code

public function __construct(DateInterface $start_date, DateInterface $end_date = NULL, TextInterface $text = NULL) {
  $this->startDate = $start_date;
  if (!empty($end_date)) {
    $this->endDate = $end_date;
  }
  if (!empty($text)) {
    $this->text = $text;
  }
}