public function FreelinkingManager::__construct in Freelinking 8.3
Same name and namespace in other branches
- 4.0.x src/FreelinkingManager.php \Drupal\freelinking\FreelinkingManager::__construct()
Creates the discovery object.
Parameters
string|bool $subdir: The plugin's subdirectory, for example Plugin/views/filter.
\Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
string|null $plugin_interface: (optional) The interface each plugin should implement.
string $plugin_definition_annotation_name: (optional) The name of the annotation that contains the plugin definition. Defaults to 'Drupal\Component\Annotation\Plugin'.
string[] $additional_annotation_namespaces: (optional) Additional namespaces to scan for annotation definitions.
Overrides DefaultPluginManager::__construct
File
- src/
FreelinkingManager.php, line 38
Class
- FreelinkingManager
- Freelinking plugin manager.
Namespace
Drupal\freelinkingCode
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager) {
parent::__construct('Plugin/freelinking', $namespaces, $module_handler, '\\Drupal\\freelinking\\Plugin\\FreelinkingPluginInterface', '\\Drupal\\freelinking\\Annotation\\Freelinking');
$this
->alterInfo('freelinking_plugin_info');
$this
->setCacheBackend($cache_backend, 'freelinking');
$this->languageManager = $language_manager;
}