You are here

public function Era::__construct in Views TimelineJS integration 8.3

Constructs a new Era object.

Parameters

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

\Drupal\views_timelinejs\TimelineJS\DateInterface $end_date: The era's end date.

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

File

src/TimelineJS/Era.php, line 41

Class

Era
Defines a TimelineJS3 era.

Namespace

Drupal\views_timelinejs\TimelineJS

Code

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