You are here

public function SimpleSitemapViews::getRouterDisplayIds in Simple XML sitemap 8.3

Same name and namespace in other branches
  1. 4.x modules/simple_sitemap_views/src/SimpleSitemapViews.php \Drupal\simple_sitemap_views\SimpleSitemapViews::getRouterDisplayIds()

Returns an array of view displays that use the route.

Parameters

\Drupal\views\ViewEntityInterface $view_entity: The config entity in which the view is stored.

Return value

array Array of display identifiers.

1 call to SimpleSitemapViews::getRouterDisplayIds()
SimpleSitemapViews::getIndexableViews in modules/simple_sitemap_views/src/SimpleSitemapViews.php
Returns an array of executable views whose current display is indexable.

File

modules/simple_sitemap_views/src/SimpleSitemapViews.php, line 452

Class

SimpleSitemapViews
Class to manage sitemap data for views.

Namespace

Drupal\simple_sitemap_views

Code

public function getRouterDisplayIds(ViewEntityInterface $view_entity) {
  $display_plugins = $this
    ->getRouterDisplayPluginIds();
  $filter_callback = function (array $display) use ($display_plugins) {
    return !empty($display['display_plugin']) && in_array($display['display_plugin'], $display_plugins);
  };
  $displays = array_filter($view_entity
    ->get('display'), $filter_callback);
  return array_keys($displays);
}