You are here

public function FieldBlock::__construct in Field as Block 8.2

Constructs a FieldBlock object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

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

\Drupal\Core\Entity\EntityFieldManagerInterface $entityFieldManager: The entity field manager.

\Drupal\Core\Field\FormatterPluginManager $formatter_plugin_manager: The field formatter plugin manager.

\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/FieldBlock.php, line 96

Class

FieldBlock
Provides a fieldblock.

Namespace

Drupal\fieldblock\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entityTypeManager, EntityFieldManagerInterface $entityFieldManager, FormatterPluginManager $formatter_plugin_manager, RouteMatchInterface $route_match, LanguageManagerInterface $languageManager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->entityTypeManager = $entityTypeManager;
  $this->entityFieldManager = $entityFieldManager;
  $this->formatterPluginManager = $formatter_plugin_manager;
  $this->routeMatch = $route_match;
  $this->languageManager = $languageManager;
}