You are here

public function ConfigPagesForm::__construct in Config Pages 8

Same name and namespace in other branches
  1. 8.3 src/ConfigPagesForm.php \Drupal\config_pages\ConfigPagesForm::__construct()
  2. 8.2 src/ConfigPagesForm.php \Drupal\config_pages\ConfigPagesForm::__construct()

Constructs a ConfigPagesForm object.

Parameters

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

\Drupal\Core\Entity\EntityStorageInterface $config_pages_storage: The custom config page storage.

\Drupal\Core\Entity\EntityStorageInterface $config_pages_type_storage: The custom config page type storage.

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

Overrides ContentEntityForm::__construct

File

src/ConfigPagesForm.php, line 62

Class

ConfigPagesForm
Form controller for the custom config page edit forms.

Namespace

Drupal\config_pages

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, EntityStorageInterface $config_pages_storage, EntityStorageInterface $config_pages_type_storage, LanguageManagerInterface $language_manager) {
  $this->ConfigPagesStorage = $config_pages_storage;
  $this->ConfigPagesTypeStorage = $config_pages_type_storage;
  $this->languageManager = $language_manager;
  $this->entityTypeManager = $entity_type_manager;

  // @to_do: this should be removed when parent class will be refactored and will not use entityManager anymore.
  $this->entityManager = $entity_type_manager;
}