You are here

public function NodeFormAlter::__construct in Group Content Menu 8

Construct our class and inject dependencies.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The `entity_type.manager` service.

\Drupal\Core\Menu\MenuParentFormSelectorInterface $menu_parent_form_selector: The `menu.parent_form_selector` service.

\Drupal\Core\Session\AccountProxyInterface $current_user: The `current_user` service.

\Drupal\Core\Plugin\Context\ContextRepositoryInterface $context_repository: The `context.repository` service.

File

src/NodeFormAlter.php, line 65

Class

NodeFormAlter
Helper class to handle altering node forms.

Namespace

Drupal\group_content_menu

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, MenuParentFormSelectorInterface $menu_parent_form_selector, AccountProxyInterface $current_user, ContextRepositoryInterface $context_repository) {
  $this->entityTypeManager = $entity_type_manager;
  $this->menuParentSelector = $menu_parent_form_selector;
  $this->currentUser = $current_user;
  $this->contextRepository = $context_repository;
}