You are here

public function CodemirrorModePluginManager::__construct in The CodeMirror Editor 8

Constructs CodemirrorModePluginManager object.

Parameters

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler to invoke the alter hook with.

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

Overrides DefaultPluginManager::__construct

File

src/CodemirrorModePluginManager.php, line 61

Class

CodemirrorModePluginManager
Defines a plugin manager to deal with CodeMirror modes.

Namespace

Drupal\codemirror_editor

Code

public function __construct(ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend, ConfigFactoryInterface $config_factory) {
  $this->configFactory = $config_factory;
  $this->factory = new ContainerFactory($this);
  $this->moduleHandler = $module_handler;
  $this
    ->alterInfo('codemirror_mode_info');
  $this
    ->setCacheBackend($cache_backend, 'codemirror_mode_plugins');
}