You are here

protected function CodemirrorModePluginManager::getDiscovery in The CodeMirror Editor 8

Gets the plugin discovery.

Return value

\Drupal\Component\Plugin\Discovery\DiscoveryInterface

Overrides DefaultPluginManager::getDiscovery

File

src/CodemirrorModePluginManager.php, line 72

Class

CodemirrorModePluginManager
Defines a plugin manager to deal with CodeMirror modes.

Namespace

Drupal\codemirror_editor

Code

protected function getDiscovery() {
  if (!isset($this->discovery)) {
    $this->discovery = new YamlDiscovery('codemirror_modes', $this->moduleHandler
      ->getModuleDirectories());
  }
  return $this->discovery;
}