public function ExtraFieldDisplayManager::__construct in Extra Field 8.2
Same name and namespace in other branches
- 8 src/Plugin/ExtraFieldDisplayManager.php \Drupal\extra_field\Plugin\ExtraFieldDisplayManager::__construct()
Constructor for ExtraFieldManager 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 63
Class
- ExtraFieldDisplayManager
- Manages Extra Field display plugins.
Namespace
Drupal\extra_field\PluginCode
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, EntityTypeManagerInterface $entity_type_manager) {
parent::__construct(self::PLUGIN_SUBDIR, $namespaces, $module_handler, self::PLUGIN_INTERFACE, self::PLUGIN_ANNOTATION_NAME);
$this
->alterInfo(self::ALTER_HOOK);
$this
->setCacheBackend($cache_backend, self::CACHE_KEY);
$this->entityTypeManager = $entity_type_manager;
}