You are here

protected function LinkAttributesManager::getDiscovery in Link Attributes widget 8

Gets the plugin discovery.

Return value

\Drupal\Component\Plugin\Discovery\DiscoveryInterface

Overrides DefaultPluginManager::getDiscovery

File

src/LinkAttributesManager.php, line 45

Class

LinkAttributesManager
Provides the link_attributes plugin manager.

Namespace

Drupal\link_attributes

Code

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