You are here

public static function UIkitViews::getUniqueId in UIkit Components 8

Same name and namespace in other branches
  1. 8.3 uikit_views/src/UIkitViews.php \Drupal\uikit_views\UIkitViews::getUniqueId()
  2. 8.2 uikit_views/src/UIkitViews.php \Drupal\uikit_views\UIkitViews::getUniqueId()

Get unique element id.

Parameters

\Drupal\views\ViewExecutable $view: A ViewExecutable object.

Return value

string A unique id for an HTML element.

1 call to UIkitViews::getUniqueId()
template_preprocess_uikit_view_grid in uikit_views/includes/uikit_views.theme.inc
Prepares variables for UIkit Grid templates.

File

uikit_views/src/UIkitViews.php, line 53

Class

UIkitViews
Class UIkitViews

Namespace

Drupal\uikit_views

Code

public static function getUniqueId(ViewExecutable $view) {
  $id = $view->storage
    ->id() . '-' . $view->current_display;
  return Html::getUniqueId('views-uikit-' . $id);
}