You are here

protected function RouteSubscriber::getBrowserIDsWithRoute in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/RouteSubscriber.php \Drupal\entity_browser\RouteSubscriber::getBrowserIDsWithRoute()

Gets entity browser IDs that use routes.

Return value

array Array of browser IDs.

1 call to RouteSubscriber::getBrowserIDsWithRoute()
RouteSubscriber::routes in src/RouteSubscriber.php
Returns a set of route objects.

File

src/RouteSubscriber.php, line 66

Class

RouteSubscriber
Generates routes for entity browsers.

Namespace

Drupal\entity_browser

Code

protected function getBrowserIDsWithRoute() {

  // Get all display plugins which provides the type.
  $display_plugins = $this->displayManager
    ->getDefinitions();
  $ids = [];
  foreach ($display_plugins as $id => $definition) {
    if (!empty($definition['uses_route'])) {
      $ids[$id] = $id;
    }
  }
  return $this->browserStorage
    ->getQuery()
    ->condition('status', TRUE)
    ->condition("display", $ids, 'IN')
    ->execute();
}