You are here

public function MenuLinkField::__construct in Menu Link (Field) 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/Menu/MenuLinkField.php \Drupal\menu_link\Plugin\Menu\MenuLinkField::__construct()

Constructs a new MenuLinkField 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 $entity_manager: The entity manager.

\Drupal\Core\Entity\EntityRepository $entity_repository: The entity repository.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

Overrides PluginBase::__construct

File

src/Plugin/Menu/MenuLinkField.php, line 63

Class

MenuLinkField
Provides a menu link plugin for field-based menu links.

Namespace

Drupal\menu_link\Plugin\Menu

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_manager, EntityRepositoryInterface $entity_repository, LanguageManagerInterface $language_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->entityTypeManager = $entity_manager;
  $this->entityRepository = $entity_repository;
  $this->languageManager = $language_manager;
}