You are here

protected function SimpleSitemapViews::getRouterDisplayPluginIds 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::getRouterDisplayPluginIds()

Get all display plugins that use the route.

Return value

array An array with plugin identifiers.

2 calls to SimpleSitemapViews::getRouterDisplayPluginIds()
SimpleSitemapViews::getIndexableViews in modules/simple_sitemap_views/src/SimpleSitemapViews.php
Returns an array of executable views whose current display is indexable.
SimpleSitemapViews::getRouterDisplayIds in modules/simple_sitemap_views/src/SimpleSitemapViews.php
Returns an array of view displays that use the route.

File

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

Class

SimpleSitemapViews
Class to manage sitemap data for views.

Namespace

Drupal\simple_sitemap_views

Code

protected function getRouterDisplayPluginIds() {
  static $plugin_ids = [];
  if (empty($plugin_ids)) {
    $display_plugins = Views::pluginManager('display')
      ->getDefinitions();

    // Get all display plugins that use the route.
    foreach ($display_plugins as $plugin_id => $definition) {
      if (!empty($definition['uses_route'])) {
        $plugin_ids[$plugin_id] = $plugin_id;
      }
    }
  }
  return $plugin_ids;
}