You are here

public static function LanguageDropdownBlock::create in Language Switcher Dropdown 8.2

Same name in this branch
  1. 8.2 src/Plugin/Derivative/LanguageDropdownBlock.php \Drupal\lang_dropdown\Plugin\Derivative\LanguageDropdownBlock::create()
  2. 8.2 src/Plugin/Block/LanguageDropdownBlock.php \Drupal\lang_dropdown\Plugin\Block\LanguageDropdownBlock::create()

Creates a new class instance.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the fetcher.

string $base_plugin_id: The base plugin ID for the plugin ID.

Return value

static Returns an instance of this fetcher.

Overrides ContainerDeriverInterface::create

File

src/Plugin/Derivative/LanguageDropdownBlock.php, line 39

Class

LanguageDropdownBlock
Provides dropdown switcher block plugin definitions for all languages.

Namespace

Drupal\lang_dropdown\Plugin\Derivative

Code

public static function create(ContainerInterface $container, $base_plugin_id) {
  return new static($container
    ->get('language_manager'));
}