You are here

public function MediaTypeManager::__construct in Media entity 8

Same name and namespace in other branches
  1. 8.2 src/MediaTypeManager.php \Drupal\media_entity\MediaTypeManager::__construct()

Constructs a new MediaTypeManager.

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.

Overrides DefaultPluginManager::__construct

File

src/MediaTypeManager.php, line 25

Class

MediaTypeManager
Manages media entity type plugins.

Namespace

Drupal\media_entity

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
  parent::__construct('Plugin/MediaEntity/Type', $namespaces, $module_handler, 'Drupal\\media_entity\\MediaTypeInterface', 'Drupal\\media_entity\\Annotation\\MediaType');
  $this
    ->alterInfo('media_entity_type_info');
  $this
    ->setCacheBackend($cache_backend, 'media_entity_type_plugins');
}