You are here

public function ContentBrowserPreview::__construct in Content Browser 8

The constructor.

Parameters

array $configuration: The configuration.

mixed $plugin_id: The plugin id.

mixed $plugin_definition: The plugin definition.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: The entity display repository.

Overrides HandlerBase::__construct

File

src/Plugin/views/field/ContentBrowserPreview.php, line 49

Class

ContentBrowserPreview
Defines a custom field that renders a preview of a Content Entity type, and allows for changing field settings with exposed input.

Namespace

Drupal\content_browser\Plugin\views\field

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityDisplayRepositoryInterface $entity_display_repository) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->entityTypeManager = $entity_type_manager;
  $this->entityDisplayRepository = $entity_display_repository;
}