You are here

public function LanguageSwitchMenuLink::__construct in Cheeseburger Menu 5.0.x

Constructs a new MenuLinkContent.

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\Language\LanguageManagerInterface $language_manager: The language manager.

\Drupal\Core\Path\PathMatcherInterface $path_matcher: Path matcher.

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

Overrides PluginBase::__construct

File

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

Class

LanguageSwitchMenuLink
Language swithcher link - dynamically changes based on langcode.

Namespace

Drupal\cheeseburger_menu\Plugin\Menu

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, LanguageManagerInterface $language_manager, PathMatcherInterface $path_matcher, EntityTypeManagerInterface $entity_type_manager, RouteMatchInterface $route_match) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->languageManager = $language_manager;
  $this->pathMatcher = $path_matcher;
  $this->entityTypeManager = $entity_type_manager;
  $this->routeMatch = $route_match;
}