You are here

public function OnlyOne::__construct in Allow a content type only once (Only One) 8

Constructor.

Parameters

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

\Drupal\Core\Database\Connection $connection: The database connection.

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

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

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

File

src/OnlyOne.php, line 69

Class

OnlyOne
Class OnlyOne.

Namespace

Drupal\onlyone

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, Connection $connection, LanguageManagerInterface $language_manager, ConfigFactoryInterface $config_factory, TranslationInterface $string_translation) {
  $this->entityTypeManager = $entity_type_manager;
  $this->connection = $connection;
  $this->languageManager = $language_manager;
  $this->configFactory = $config_factory;
  $this->stringTranslation = $string_translation;
  $this->formatter = new OnlyOnePrintAdminPage();
}