You are here

public function WrapperManager::getDiscovery in Field Token Value 2.x

Same name and namespace in other branches
  1. 8 src/WrapperManager.php \Drupal\field_token_value\WrapperManager::getDiscovery()

Gets the plugin discovery.

Return value

\Drupal\Component\Plugin\Discovery\DiscoveryInterface

Overrides DefaultPluginManager::getDiscovery

File

src/WrapperManager.php, line 89
Contains \Drupal\field_token_value\WrapperManager.

Class

WrapperManager
Gathers and provides the tags that can be used to wrap field content within Field Token Value fields.

Namespace

Drupal\field_token_value

Code

public function getDiscovery() {
  if (!isset($this->discovery)) {
    $this->discovery = new YamlDiscovery('field_token_value', $this->moduleHandler
      ->getModuleDirectories() + $this->themeHandler
      ->getThemeDirectories());
    $this->discovery = new ContainerDerivativeDiscoveryDecorator($this->discovery);
  }
  return $this->discovery;
}