You are here

public function ConfigPagesForm::__construct in Config Pages 8.3

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

Constructs a ConfigPagesForm object.

Parameters

EntityRepositoryInterface $entity_repository:

\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.

MessengerInterface $messenger:

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle service.

\Drupal\Component\Datetime\TimeInterface $time: The time service.

\Drupal\Core\Session\AccountProxyInterface $user: User proxy, for checking permissions.

Overrides ContentEntityForm::__construct

File

src/ConfigPagesForm.php, line 89

Class

ConfigPagesForm
Form controller for the custom config page edit forms.

Namespace

Drupal\config_pages

Code

public function __construct(EntityRepositoryInterface $entity_repository, EntityTypeManagerInterface $entity_type_manager, EntityStorageInterface $config_pages_storage, EntityStorageInterface $config_pages_type_storage, LanguageManagerInterface $language_manager, MessengerInterface $messenger, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, TimeInterface $time = NULL, AccountProxyInterface $user = NULL) {
  parent::__construct($entity_repository, $entity_type_bundle_info, $time);
  $this->configPagesStorage = $config_pages_storage;
  $this->configPagesTypeStorage = $config_pages_type_storage;
  $this->languageManager = $language_manager;
  $this->entityTypeManager = $entity_type_manager;
  $this->user = $user;
  $this->messenger = $messenger;
}