You are here

public function SimpleSitemapViews::getDisplayPathPluginIds in Simple XML sitemap (Views integration) 8

Get all display plugins that use the route.

Return value

array An array with plugin identifiers.

1 call to SimpleSitemapViews::getDisplayPathPluginIds()
SimpleSitemapViews::isValidDisplay in src/SimpleSitemapViews.php
Callback for filtering view displays.

File

src/SimpleSitemapViews.php, line 274
Contains simple_sitemap_views service.

Class

SimpleSitemapViews
Class to manage sitemap data for views.

Namespace

Drupal\simple_sitemap_views

Code

public function getDisplayPathPluginIds() {
  static $plugin_ids = [];
  if (empty($plugin_ids)) {

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