public function EntityEmbedDisplayManager::__construct in Entity Embed 8
Constructs a new EntityEmbedDisplayManager.
Parameters
\Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations.
\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler to invoke the alter hook with.
Overrides DefaultPluginManager::__construct
File
- src/
EntityEmbedDisplay/ EntityEmbedDisplayManager.php, line 33
Class
- EntityEmbedDisplayManager
- Provides an Entity Embed display plugin manager.
Namespace
Drupal\entity_embed\EntityEmbedDisplayCode
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/entity_embed/EntityEmbedDisplay', $namespaces, $module_handler, 'Drupal\\entity_embed\\EntityEmbedDisplay\\EntityEmbedDisplayInterface', 'Drupal\\entity_embed\\Annotation\\EntityEmbedDisplay');
$this
->alterInfo('entity_embed_display_plugins');
// @todo Move the cache tag to the derivers once https://www.drupal.org/node/3001284 lands.
$this
->setCacheBackend($cache_backend, 'entity_embed_display_plugins', [
'config:entity_view_mode_list',
]);
}