protected function LinkRelationTypeManager::getDiscovery in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Http/LinkRelationTypeManager.php \Drupal\Core\Http\LinkRelationTypeManager::getDiscovery()
- 10 core/lib/Drupal/Core/Http/LinkRelationTypeManager.php \Drupal\Core\Http\LinkRelationTypeManager::getDiscovery()
Gets the plugin discovery.
Return value
\Drupal\Component\Plugin\Discovery\DiscoveryInterface
Overrides DefaultPluginManager::getDiscovery
File
- core/
lib/ Drupal/ Core/ Http/ LinkRelationTypeManager.php, line 52
Class
- LinkRelationTypeManager
- Provides a default plugin manager for link relation types.
Namespace
Drupal\Core\HttpCode
protected function getDiscovery() {
if (!$this->discovery) {
$directories = [
'core' => $this->root . '/core',
];
$directories += array_map(function (Extension $extension) {
return $this->root . '/' . $extension
->getPath();
}, $this->moduleHandler
->getModuleList());
$this->discovery = new YamlDiscovery('link_relation_types', $directories);
}
return $this->discovery;
}