public function ExtraFieldDisplayManager::__construct in Extra Field 8
Same name and namespace in other branches
- 8.2 src/Plugin/ExtraFieldDisplayManager.php \Drupal\extra_field\Plugin\ExtraFieldDisplayManager::__construct()
Constructor for ExtraFieldDisplayManager objects.
Parameters
\Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations.
\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler to invoke the alter hook with.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
Overrides DefaultPluginManager::__construct
File
- src/
Plugin/ ExtraFieldDisplayManager.php, line 46
Class
- ExtraFieldDisplayManager
- Manages Extra Field plugins.
Namespace
Drupal\extra_field\PluginCode
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, EntityTypeManagerInterface $entity_type_manager) {
parent::__construct('Plugin/ExtraField/Display', $namespaces, $module_handler, 'Drupal\\extra_field\\Plugin\\ExtraFieldDisplayInterface', 'Drupal\\extra_field\\Annotation\\ExtraFieldDisplay');
$this
->alterInfo('extra_field_display_info');
$this
->setCacheBackend($cache_backend, 'extra_field_display_plugins');
$this->entityTypeManager = $entity_type_manager;
}