You are here

public function NameGenerator::__construct in Name Field 8

Constructs a name formatter object.

Parameters

\Drupal\name\NameFormatter $formatter: The name formatter.

\Drupal\name\NameFormatParser $parser: The name format parser.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The factory for configuration objects.

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

\Drupal\Core\StringTranslation\TranslationInterface $translation: The string translation.

File

src/NameGenerator.php, line 67

Class

NameGenerator
Handles name generation.

Namespace

Drupal\name

Code

public function __construct(NameFormatter $formatter, NameFormatParser $parser, ConfigFactoryInterface $config_factory, LanguageManagerInterface $language_manager, TranslationInterface $translation) {
  $this->formatter = $formatter;
  $this->parser = $parser;
  $this->configFactory = $config_factory;
  $this->languageManager = $language_manager;
  $this->stringTranslation = $translation;
}