function SwitchUserListHelper::__construct

Constructs a new SwitchUserListHelper service.

Parameters

\Drupal\Core\Session\AccountInterface $current_user: Current user.

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

\Drupal\Core\Routing\RedirectDestinationInterface $redirect_destination: The redirect destination service.

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The translation manager.

File

src/SwitchUserListHelper.php, line 56

Class

SwitchUserListHelper
Switch user helper service.

Namespace

Drupal\devel

Code

public function __construct(AccountInterface $current_user, EntityTypeManagerInterface $entity_type_manager, RedirectDestinationInterface $redirect_destination, TranslationInterface $string_translation) {
    $this->currentUser = $current_user;
    $this->userStorage = $entity_type_manager->getStorage('user');
    $this->redirectDestination = $redirect_destination;
    $this->stringTranslation = $string_translation;
    $this->roleStorage = $entity_type_manager->getStorage('user_role');
}