function NegotiationConfigureForm::create

Same name in other branches
  1. 8.9.x core/modules/language/src/Form/NegotiationConfigureForm.php \Drupal\language\Form\NegotiationConfigureForm::create()
  2. 10 core/modules/language/src/Form/NegotiationConfigureForm.php \Drupal\language\Form\NegotiationConfigureForm::create()
  3. 11.x core/modules/language/src/Form/NegotiationConfigureForm.php \Drupal\language\Form\NegotiationConfigureForm::create()

Overrides ConfigFormBase::create

File

core/modules/language/src/Form/NegotiationConfigureForm.php, line 95

Class

NegotiationConfigureForm
Configure the selected language negotiation method for this site.

Namespace

Drupal\language\Form

Code

public static function create(ContainerInterface $container) {
    $entity_type_manager = $container->get('entity_type.manager');
    $block_storage = $entity_type_manager->hasHandler('block', 'storage') ? $entity_type_manager->getStorage('block') : NULL;
    return new static($container->get('config.factory'), $container->get('language_manager'), $container->get('language_negotiator'), $container->get('plugin.manager.block'), $container->get('theme_handler'), $block_storage);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.