You are here

public function Timeline::addEra in Views TimelineJS integration 8.3

Adds a new era to the timeline's eras array.

Parameters

\Drupal\views_timelinejs\TimelineJS\EraInterface $era: The new era.

Overrides TimelineInterface::addEra

File

src/TimelineJS/Timeline.php, line 69

Class

Timeline
Defines a TimelineJS3 timeline.

Namespace

Drupal\views_timelinejs\TimelineJS

Code

public function addEra(EraInterface $era) {
  $this->eras[] = $era;
}