You are here

public function WorkspaceBlock::__construct in Workspace 8

Parameters

array $configuration:

string $plugin_id:

mixed $plugin_definition:

\Drupal\multiversion\Workspace\WorkspaceManagerInterface $workspace_manager:

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager:

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/WorkspaceBlock.php, line 32

Class

WorkspaceBlock
Plugin annotation @Block( id = "workspace_switcher_block", admin_label = @Translation("Workspace switcher"), category = @Translation("Workspace"), )

Namespace

Drupal\workspace\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, WorkspaceManagerInterface $workspace_manager, EntityTypeManagerInterface $entity_type_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->workspaceManager = $workspace_manager;
  $this->entityTypeManager = $entity_type_manager;
}