You are here

public function ExtraFieldFormManager::__construct in Extra Field 8.2

Constructor for ExtraFieldFormManager 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/ExtraFieldFormManager.php, line 64

Class

ExtraFieldFormManager
Manages Extra Field form plugins.

Namespace

Drupal\extra_field\Plugin

Code

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;
}