You are here

protected function TimelineJS::buildUniqueId in Views TimelineJS integration 8.3

Builds a timeline unique id from the current data row.

Return value

string A unique ID for a slide.

2 calls to TimelineJS::buildUniqueId()
TimelineJS::buildSlide in src/Plugin/views/style/TimelineJS.php
Builds a timeline slide from the current views data row.
TimelineJS::buildTitleSlide in src/Plugin/views/style/TimelineJS.php
Builds a timeline title slide from the current views data row.

File

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

Class

TimelineJS
Style plugin to render items as TimelineJS3 slides.

Namespace

Drupal\views_timelinejs\Plugin\views\style

Code

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