You are here

protected function TimelineJS::buildDisplayDate in Views TimelineJS integration 8.3

Builds a timeline display date from the current data row.

Return value

string A string which contains the text to be displayed instead of the start and end dates of a slide.

1 call to TimelineJS::buildDisplayDate()
TimelineJS::buildSlide in src/Plugin/views/style/TimelineJS.php
Builds a timeline slide from the current views data row.

File

src/Plugin/views/style/TimelineJS.php, line 554

Class

TimelineJS
Style plugin to render items as TimelineJS3 slides.

Namespace

Drupal\views_timelinejs\Plugin\views\style

Code

protected function buildDisplayDate() {
  $display_date = '';
  if ($this->options['timeline_fields']['display_date']) {
    $display_date_markup = $this
      ->getField($this->view->row_index, $this->options['timeline_fields']['display_date']);
    $display_date = $display_date_markup ? $display_date_markup
      ->__toString() : '';
  }
  return $display_date;
}