3 namespace Drupal\entity_browser;
5 use Drupal\Core\Cache\CacheBackendInterface;
6 use Drupal\Core\Extension\ModuleHandlerInterface;
7 use Drupal\Core\Plugin\DefaultPluginManager;
10 * Manages entity browser selection display plugins.
12 class SelectionDisplayManager extends DefaultPluginManager {
15 * Constructs a new SelectionDisplayManager.
17 * @param \Traversable $namespaces
18 * An object that implements \Traversable which contains the root paths
19 * keyed by the corresponding namespace to look for plugin implementations.
20 * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
21 * Cache backend instance to use.
22 * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
25 public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
26 parent::__construct('Plugin/EntityBrowser/SelectionDisplay', $namespaces, $module_handler, 'Drupal\entity_browser\SelectionDisplayInterface', 'Drupal\entity_browser\Annotation\EntityBrowserSelectionDisplay');
28 $this->alterInfo('entity_browser_selection_display_info');
29 $this->setCacheBackend($cache_backend, 'entity_browser_selection_display_plugins');