You are here

public static function ViewsBootstrap::getUniqueId in Views Bootstrap 8.4

Same name and namespace in other branches
  1. 8.3 src/ViewsBootstrap.php \Drupal\views_bootstrap\ViewsBootstrap::getUniqueId()

Get unique element id.

Parameters

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

Return value

string A unique id for an HTML element.

7 calls to ViewsBootstrap::getUniqueId()
template_preprocess_views_bootstrap_accordion in ./views_bootstrap.theme.inc
Prepares variables for views accordion templates.
template_preprocess_views_bootstrap_cards in ./views_bootstrap.theme.inc
Prepares variables for views cards templates.
template_preprocess_views_bootstrap_carousel in ./views_bootstrap.theme.inc
Prepares variables for views carousel template.
template_preprocess_views_bootstrap_grid in ./views_bootstrap.theme.inc
Prepares variables for views grid templates.
template_preprocess_views_bootstrap_list_group in ./views_bootstrap.theme.inc
Prepares variables for views list group templates.

... See full list

File

src/ViewsBootstrap.php, line 102

Class

ViewsBootstrap
The primary class for the Views Bootstrap module.

Namespace

Drupal\views_bootstrap

Code

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